mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05: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 {
|
} else {
|
||||||
/* Parent */
|
/* 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);
|
redisLog(REDIS_NOTICE,"Background saving started by pid %d",childpid);
|
||||||
server.bgsaveinprogress = 1;
|
server.bgsaveinprogress = 1;
|
||||||
return REDIS_OK;
|
return REDIS_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user