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

@ -588,7 +588,8 @@ int rewriteAppendOnlyFileBackground(void) {
char tmpfile[256];
if (server.vm_enabled) vmReopenSwapFile();
close(server.fd);
if (server.ipfd > 0) close(server.ipfd);
if (server.sofd > 0) close(server.sofd);
snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) getpid());
if (rewriteAppendOnlyFile(tmpfile) == REDIS_OK) {
_exit(0);