mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
Check for fork() failure in background saving
This commit is contained in:
parent
3a2694c441
commit
5a7c647e9a
5
redis.c
5
redis.c
@ -1879,6 +1879,11 @@ static int rdbSaveBackground(char *filename) {
|
||||
}
|
||||
} else {
|
||||
/* Parent */
|
||||
if (childpid == -1) {
|
||||
redisLog(REDIS_WARNING,"Can't save in background: fork: %s",
|
||||
strerror(errno));
|
||||
return REDIS_ERR;
|
||||
}
|
||||
redisLog(REDIS_NOTICE,"Background saving started by pid %d",childpid);
|
||||
server.bgsaveinprogress = 1;
|
||||
return REDIS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user