summaryrefslogtreecommitdiff
path: root/src/aof.c
diff options
context:
space:
mode:
authorharleyliao <357857613@qq.com>2021-11-16 19:59:03 +0800
committerGitHub <noreply@github.com>2021-11-16 13:59:03 +0200
commit992a610fe819c0bea381c5c717a218019362b40e (patch)
tree567cadb5f4a26595522919ec31cbd91eefcfa9c8 /src/aof.c
parent985430b4fca5ac55b121a98ac0407909c6767530 (diff)
downloadredis-992a610fe819c0bea381c5c717a218019362b40e.tar.gz
set aof rewrite status err, when fork fail (#5606)
when aof rewrite is failed by fork(), It'll be indicated by aof_last_bgrewrite_status INFO field, same as when the fork child fails later on.
Diffstat (limited to 'src/aof.c')
-rw-r--r--src/aof.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/aof.c b/src/aof.c
index 523aa1a51..69c4d8681 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -1755,6 +1755,7 @@ int rewriteAppendOnlyFileBackground(void) {
} else {
/* Parent */
if (childpid == -1) {
+ server.aof_lastbgrewrite_status = C_ERR;
serverLog(LL_WARNING,
"Can't rewrite append only file in background: fork: %s",
strerror(errno));