From: antirez Date: Wed, 19 May 2010 11:36:32 +0000 (+0200) Subject: Fix for 'CONFIG SET appendonly no' X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/30dd89b6b72643beafa098344752812029ce7bd9?ds=inline;hp=--cc Fix for 'CONFIG SET appendonly no' --- 30dd89b6b72643beafa098344752812029ce7bd9 diff --git a/redis.c b/redis.c index fed633cf..b95eb455 100644 --- a/redis.c +++ b/redis.c @@ -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; } }