]> granicus.if.org Git - apache/commitdiff
Fix other_child logic that would cause the mod_cgid process not
authorAaron Bannert <aaron@apache.org>
Thu, 14 Feb 2002 02:49:07 +0000 (02:49 +0000)
committerAaron Bannert <aaron@apache.org>
Thu, 14 Feb 2002 02:49:07 +0000 (02:49 +0000)
to properly die when the parent process shuts down.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93404 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_cgid.c

index cec3199b3cca06c5456692fffd78c3fb789d2a25..c5385af25b028d65f0836a5206defc35b697692d 100644 (file)
@@ -245,7 +245,9 @@ static void cgid_maint(int reason, void *data, apr_wait_t status)
 
     switch (reason) {
         case APR_OC_REASON_DEATH:
+        case APR_OC_REASON_RESTART:
             /* don't do anything; server is stopping or restarting */
+            apr_proc_other_child_unregister(data);
             break;
         case APR_OC_REASON_LOST:
             /* it would be better to restart just the cgid child
@@ -255,9 +257,6 @@ static void cgid_maint(int reason, void *data, apr_wait_t status)
              */
             kill(getpid(), AP_SIG_GRACEFUL);
             break;
-        case APR_OC_REASON_RESTART:
-            apr_proc_other_child_unregister(data);
-            break;
         case APR_OC_REASON_UNREGISTER:
             /* we get here when pcgi is cleaned up; pcgi gets cleaned
              * up when pconf gets cleaned up