From: William A. Rowe Jr Date: Thu, 5 Jun 2008 17:27:32 +0000 (+0000) Subject: For winnt_mpm console mode, always reset our console handler to be the first, X-Git-Tag: 2.3.0~548 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0135f15d5235651943d4af71a89ab6cbf7fb8c60;p=apache 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@663669 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 54452b9c7a..4ba94c6b47 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -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 */ {