summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2020-02-27 17:39:33 +0100
committerGitHub <noreply@github.com>2020-02-27 17:39:33 +0100
commit652c532292abd21906380eb98fa788ffc770db88 (patch)
tree3c0b3f477137cdc9640cf7f4187067d9dab1c309 /src
parentca825701dca190f2c586e30622453dd9561e7fec (diff)
parentdd05b7f67f8191aacbbe73a1b415658233715926 (diff)
downloadredis-652c532292abd21906380eb98fa788ffc770db88.tar.gz
Merge pull request #6785 from patpatbear/issue_#6696_fix_aof_child_whitelist_SIGUSR1
fix impl of aof-child whitelist SIGUSR1 feature.
Diffstat (limited to 'src')
-rw-r--r--src/aof.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/aof.c b/src/aof.c
index 3682c4568..8ab9349f0 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -1798,14 +1798,15 @@ 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;
+
+ serverLog(LL_WARNING,
+ "Background AOF rewrite terminated with error");
+ } else {
/* SIGUSR1 is whitelisted, so we have a way to kill a child without
* tirggering an error condition. */
if (bysignal != SIGUSR1)
server.aof_lastbgrewrite_status = C_ERR;
- serverLog(LL_WARNING,
- "Background AOF rewrite terminated with error");
- } else {
- server.aof_lastbgrewrite_status = C_ERR;
serverLog(LL_WARNING,
"Background AOF rewrite terminated by signal %d", bysignal);