check for children cleanup prior to checking for termination.

That allows to quickly terminate after the secmod death is detected.
This commit is contained in:
Nikos Mavrogiannopoulos
2013-05-13 22:53:18 +02:00
parent 30efc0433e
commit ddae1e8339

View File

@@ -571,6 +571,10 @@ static void check_other_work(main_server_st *s)
reload_conf = 0;
}
if (need_children_cleanup != 0) {
cleanup_children(s);
}
if (terminate != 0) {
mslog(s, NULL, LOG_DEBUG, "termination signal received; waiting for children to die");
kill_children(s);
@@ -590,10 +594,6 @@ static void check_other_work(main_server_st *s)
expire_banned(s);
alarm(MAINTAINANCE_TIME(s));
}
if (need_children_cleanup != 0) {
cleanup_children(s);
}
}
#ifdef HAVE_LIBWRAP