X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/56e52b69feebb11931cbe8162ce1749909b7ff30..8df3dcada5e34c6a99666931ee6dcccd57685353:/src/rdb.c diff --git a/src/rdb.c b/src/rdb.c index a401a5b9..589b536a 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -461,7 +461,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 {