]> git.ipfire.org Git - thirdparty/apache/httpd.git/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:28:08 +0000 (17:28 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 5 Jun 2008 17:28:08 +0000 (17:28 +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
Backports: r663669

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@663671 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/mpm_winnt.c

index 4f58fa2fdb4ae8c7eece0e85130b02348a70d71c..1a438fb53b39d5314a6d99e2e90d7cc4924ae409 100644 (file)
@@ -1553,10 +1553,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 
@@ -1572,6 +1568,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 */
     {