Modlue fork is killed when the parent exists

This commit is contained in:
Oran Agra
2019-08-25 10:11:48 +03:00
parent 56258c6b7d
commit 78bbb9b58d
3 changed files with 22 additions and 11 deletions

View File

@ -3551,6 +3551,12 @@ int prepareForShutdown(int flags) {
killRDBChild();
}
/* Kill module child if there is one. */
if (server.module_child_pid != -1) {
serverLog(LL_WARNING,"There is a module fork child. Killing it!");
TerminateModuleForkChild(0);
}
if (server.aof_state != AOF_OFF) {
/* Kill the AOF saving child as the AOF we already have may be longer
* but contains the full dataset anyway. */