mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
fix impl of aof-child whitelist SIGUSR1 feature.
This commit is contained in:
parent
7ef2270ee7
commit
dd05b7f67f
@ -1797,14 +1797,15 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
|
|||||||
serverLog(LL_VERBOSE,
|
serverLog(LL_VERBOSE,
|
||||||
"Background AOF rewrite signal handler took %lldus", ustime()-now);
|
"Background AOF rewrite signal handler took %lldus", ustime()-now);
|
||||||
} else if (!bysignal && exitcode != 0) {
|
} 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
|
/* SIGUSR1 is whitelisted, so we have a way to kill a child without
|
||||||
* tirggering an error condition. */
|
* tirggering an error condition. */
|
||||||
if (bysignal != SIGUSR1)
|
if (bysignal != SIGUSR1)
|
||||||
server.aof_lastbgrewrite_status = C_ERR;
|
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,
|
serverLog(LL_WARNING,
|
||||||
"Background AOF rewrite terminated by signal %d", bysignal);
|
"Background AOF rewrite terminated by signal %d", bysignal);
|
||||||
|
Loading…
Reference in New Issue
Block a user