]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) core/prefork: run new hook `child_stopped` only on clean exit.
authorStefan Eissing <icing@apache.org>
Thu, 24 Feb 2022 16:59:31 +0000 (16:59 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 24 Feb 2022 16:59:31 +0000 (16:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898381 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/prefork/prefork.c

index d1e17b26f09137b317ad2a199c3a1a181130bb6e..71532d611cc0f1015dfab7fbd04943f6583afc87 100644 (file)
@@ -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.