X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/ca734d17ad9b7ea97a87bd048ad1c1e253ef67a6..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 {