main: terminate sec-mod after every worker process has been sent a signal

That is to reduce any possible timeouts caused by a defunc sec-mod on
termination.
This commit is contained in:
Nikos Mavrogiannopoulos
2016-01-27 13:46:55 +01:00
parent ced5e9b3f4
commit 0315aa7c4f

View File

@@ -913,12 +913,12 @@ static void kill_children(main_server_st* s)
struct proc_st *ctmp = NULL, *cpos;
/* kill the security module server */
kill(s->sec_mod_pid, SIGTERM);
list_for_each_safe(&s->proc_list.head, ctmp, cpos, list) {
if (ctmp->pid != -1) {
remove_proc(s, ctmp, RPROC_KILL|RPROC_QUIT);
}
}
kill(s->sec_mod_pid, SIGTERM);
}
static void term_sig_watcher_cb(struct ev_loop *loop, ev_signal *w, int revents)