Refactoring: always kill AOF/RDB child via helper functions.

This commit is contained in:
antirez
2019-01-21 11:28:44 +01:00
parent 5f42bfce05
commit 4dc69497f5
6 changed files with 17 additions and 14 deletions

View File

@ -1254,10 +1254,7 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) {
"Killing process %ld and removing its temp file to avoid "
"any race",
(long) server.rdb_child_pid);
kill(server.rdb_child_pid,SIGUSR1);
rdbRemoveTempFile(server.rdb_child_pid);
closeChildInfoPipe();
updateDictResizePolicy();
killRDBChild();
}
if (rename(server.repl_transfer_tmpfile,server.rdb_filename) == -1) {