From: Stefan Eissing Date: Thu, 24 Feb 2022 16:59:31 +0000 (+0000) Subject: *) core/prefork: run new hook `child_stopped` only on clean exit. X-Git-Tag: 2.5.0-alpha2-ci-test-only~472 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18ddb6670b86805570f74b217a2206c66a3b6413;p=thirdparty%2Fapache%2Fhttpd.git *) 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 --- 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.