From ddae1e8339e19a4065d68713315e5b4cbc781ed1 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 13 May 2013 22:53:18 +0200 Subject: [PATCH] check for children cleanup prior to checking for termination. That allows to quickly terminate after the secmod death is detected. --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 1c1548df..34dd64b2 100644 --- a/src/main.c +++ b/src/main.c @@ -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