]> granicus.if.org Git - apache/commitdiff
For winnt_mpm console mode, always reset our console handler to be the first,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 5 Jun 2008 17:27:32 +0000 (17:27 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 5 Jun 2008 17:27:32 +0000 (17:27 +0000)
even on a restart, because some modules (e.g. mod_perl) might have set a console
handler to terminate the process.

PR: 44800 (part 1/3)
Submitted by: tdonovan

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

server/mpm/winnt/mpm_winnt.c

index 54452b9c7a7f92ff01c0c3ca67cc83114613ef09..4ba94c6b47bfcdfde6f3ec623068a76c6985e990 100644 (file)
@@ -1612,10 +1612,6 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
                     }
                 }
             }
-            else /* ! -k runservice */
-            {
-                mpm_start_console_handler();
-            }
 
             /* Create the start mutex, as an unnamed object for security.
              * Ths start mutex is used during a restart to prevent more than
@@ -1631,6 +1627,12 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
         }
+        /* Always reset our console handler to be the first, even on a restart
+        *  because some modules (e.g. mod_perl) might have set a console 
+        *  handler to terminate the process.
+        */
+        if (strcasecmp(signal_arg, "runservice"))
+            mpm_start_console_handler();
     }
     else /* parent_pid != my_pid */
     {