Change initialization to allow listening on both a port and socket

This commit is contained in:
Pieter Noordhuis
2010-08-03 13:33:12 +02:00
parent 7e91f971f7
commit a5639e7dd9
6 changed files with 49 additions and 20 deletions

View File

@ -448,7 +448,8 @@ int rdbSaveBackground(char *filename) {
if ((childpid = fork()) == 0) {
/* Child */
if (server.vm_enabled) vmReopenSwapFile();
close(server.fd);
if (server.ipfd > 0) close(server.ipfd);
if (server.sofd > 0) close(server.sofd);
if (rdbSave(filename) == REDIS_OK) {
_exit(0);
} else {