Fix for 'CONFIG SET appendonly no'

This commit is contained in:
antirez 2010-05-19 13:36:32 +02:00
parent 2e5eb04e50
commit 30dd89b6b7
1 changed files with 3 additions and 2 deletions

View File

@ -8738,11 +8738,12 @@ static void stopAppendOnly(void) {
if (server.bgsavechildpid != -1) {
int statloc;
kill(server.bgsavechildpid,SIGKILL);
wait3(&statloc,0,NULL);
if (kill(server.bgsavechildpid,SIGKILL) != -1)
wait3(&statloc,0,NULL);
/* reset the buffer accumulating changes while the child saves */
sdsfree(server.bgrewritebuf);
server.bgrewritebuf = sdsempty();
server.bgsavechildpid = -1;
}
}