From 18ddb6670b86805570f74b217a2206c66a3b6413 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Thu, 24 Feb 2022 16:59:31 +0000 Subject: [PATCH] *) core/prefork: run new hook `child_stopped` only on clean exit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898381 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/prefork/prefork.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index d1e17b26f09..71532d611cc 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -225,12 +225,12 @@ static void clean_child_exit(int code) apr_signal(SIGTERM, SIG_IGN); retained->mpm->mpm_state = AP_MPMQ_STOPPING; - if (code == 0) { - ap_run_child_stopping(pchild, 0); - } if (pchild) { - ap_run_child_stopped(pchild, 0); + if (code == 0) { + ap_run_child_stopping(pchild, 0); + ap_run_child_stopped(pchild, 0); + } apr_pool_destroy(pchild); /* * Be safe in case someone still uses afterwards or we get here again. -- 2.47.2