From: William A. Rowe Jr Date: Fri, 8 Nov 2002 16:31:37 +0000 (+0000) Subject: We didn't atexit() the win32 keep-console-open-on-error handler early X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7379501fb8e66590e2d99bb3e58685dcf4a5afdc;p=apache We didn't atexit() the win32 keep-console-open-on-error handler early enough to catch some preflight errors. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97461 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 6db4f8c41e..45a1e29110 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1142,7 +1142,10 @@ void winnt_rewrite_args(process_rec *process) /* This is the parent, we have a long way to go :-) */ parent_pid = my_pid = GetCurrentProcessId(); - + + /* This behavior is voided by setting real_exit_code to 0 */ + atexit(hold_console_open_on_error); + /* Rewrite process->argv[]; * * strip out -k signal into signal_arg @@ -1366,9 +1369,6 @@ static int winnt_pre_config(apr_pool_t *pconf_, apr_pool_t *plog, apr_pool_t *pt */ pconf = pconf_; - /* This behavior is voided by setting real_exit_code to 0 */ - atexit(hold_console_open_on_error); - if (ap_exists_config_define("ONE_PROCESS") || ap_exists_config_define("DEBUG")) one_process = -1;