diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2020-02-27 17:39:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 17:39:33 +0100 |
commit | 652c532292abd21906380eb98fa788ffc770db88 (patch) | |
tree | 3c0b3f477137cdc9640cf7f4187067d9dab1c309 /src | |
parent | ca825701dca190f2c586e30622453dd9561e7fec (diff) | |
parent | dd05b7f67f8191aacbbe73a1b415658233715926 (diff) | |
download | redis-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.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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); |