summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-07-07 13:24:44 +0200
committerantirez <antirez@gmail.com>2011-07-07 13:24:44 +0200
commitd3203c16f56b0042375c8725b3fcc54549f995e6 (patch)
tree33c4524d861f2c69ee39888454437dea7c71778e
parent2e1adff83e9c5324054888e8c37c659f10d23b4d (diff)
downloadredis-d3203c16f56b0042375c8725b3fcc54549f995e6.tar.gz
Fixed a problem with AOF when it is stopped via CONFIG SET appendonly no. We used to kill the wrong child...
-rw-r--r--src/aof.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/aof.c b/src/aof.c
index 06c9a47d5..b0852c47f 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -19,15 +19,15 @@ void stopAppendOnly(void) {
server.appendseldb = -1;
server.appendonly = 0;
/* rewrite operation in progress? kill it, wait child exit */
- if (server.bgsavechildpid != -1) {
+ if (server.bgrewritechildpid != -1) {
int statloc;
- if (kill(server.bgsavechildpid,SIGKILL) != -1)
+ if (kill(server.bgrewritechildpid,SIGKILL) != -1)
wait3(&statloc,0,NULL);
/* reset the buffer accumulating changes while the child saves */
sdsfree(server.bgrewritebuf);
server.bgrewritebuf = sdsempty();
- server.bgsavechildpid = -1;
+ server.bgrewritechildpid = -1;
}
}