mirror of
https://github.com/fluencelabs/redis
synced 2025-06-26 07:21:35 +00:00
Refactoring: always kill AOF/RDB child via helper functions.
This commit is contained in:
10
src/rdb.c
10
src/rdb.c
@ -2225,6 +2225,16 @@ void backgroundSaveDoneHandler(int exitcode, int bysignal) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Kill the RDB saving child using SIGUSR1 (so that the parent will know
|
||||
* the child did not exit for an error, but because we wanted), and performs
|
||||
* the cleanup needed. */
|
||||
void killRDBChild(void) {
|
||||
kill(server.rdb_child_pid,SIGUSR1);
|
||||
rdbRemoveTempFile(server.rdb_child_pid);
|
||||
closeChildInfoPipe();
|
||||
updateDictResizePolicy();
|
||||
}
|
||||
|
||||
/* Spawn an RDB child that writes the RDB to the sockets of the slaves
|
||||
* that are currently in SLAVE_STATE_WAIT_BGSAVE_START state. */
|
||||
int rdbSaveToSlavesSockets(rdbSaveInfo *rsi) {
|
||||
|
Reference in New Issue
Block a user