For coverage testing use exit() instead of _exit() when termiating saving children.

This commit is contained in:
antirez
2012-04-07 12:11:23 +02:00
parent 4ce22375f4
commit 2cbdab903f
5 changed files with 17 additions and 4 deletions

View File

@ -803,9 +803,9 @@ int rewriteAppendOnlyFileBackground(void) {
if (server.sofd > 0) close(server.sofd);
snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) getpid());
if (rewriteAppendOnlyFile(tmpfile) == REDIS_OK) {
_exit(0);
exitFromChild(0);
} else {
_exit(1);
exitFromChild(1);
}
} else {
/* Parent */