From 30dd89b6b72643beafa098344752812029ce7bd9 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 19 May 2010 13:36:32 +0200 Subject: [PATCH 1/1] Fix for 'CONFIG SET appendonly no' --- redis.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } } -- 2.45.2