summaryrefslogtreecommitdiff
path: root/src/aof.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-11-13 09:32:07 +0100
committerantirez <antirez@gmail.com>2015-11-13 09:32:20 +0100
commit8a0258aa4374212d8bf7004fa9022f821f6c93ed (patch)
tree7199763cf36a47e63f0e544c537ed4636ae0d64b /src/aof.c
parent54f5ecfd49a2430046eb85860a73d1b2bfcd64e5 (diff)
downloadredis-8a0258aa4374212d8bf7004fa9022f821f6c93ed.tar.gz
AOF: rewriting child killed by SIGUSR1 is not an error.
Diffstat (limited to 'src/aof.c')
-rw-r--r--src/aof.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/aof.c b/src/aof.c
index 4d971ff10..9bfb9e906 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -1455,8 +1455,10 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
serverLog(LL_VERBOSE,
"Background AOF rewrite signal handler took %lldus", ustime()-now);
} else if (!bysignal && exitcode != 0) {
- server.aof_lastbgrewrite_status = C_ERR;
-
+ /* SIGUSR1 is whitelisted, so we have a way to kill a child without
+ * tirggering an error conditon. */
+ if (bysignal != SIGUSR1)
+ server.aof_lastbgrewrite_status = C_ERR;
serverLog(LL_WARNING,
"Background AOF rewrite terminated with error");
} else {