From: William A. Rowe Jr Date: Thu, 5 Jun 2008 17:27:56 +0000 (+0000) Subject: For winnt_mpm console mode, always reset our console handler to be the first, X-Git-Tag: 2.2.9~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3409eaf1050620f4e79ed90bab115a61ec256a2d;p=thirdparty%2Fapache%2Fhttpd.git For winnt_mpm console mode, 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. PR: 44800 (part 1/3) Submitted by: tdonovan Backports: r663669 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@663670 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 48fb05363c5..0a3e978c959 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1594,10 +1594,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 @@ -1613,6 +1609,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 */ {