]> granicus.if.org Git - apache/commitdiff
We didn't atexit() the win32 keep-console-open-on-error handler early
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 8 Nov 2002 16:31:37 +0000 (16:31 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 8 Nov 2002 16:31:37 +0000 (16:31 +0000)
  enough to catch some preflight errors.

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

server/mpm/winnt/mpm_winnt.c

index 6db4f8c41e9d926ecffd6001ab190e580bee753a..45a1e29110a801b5de65ea11081a515ef41db32b 100644 (file)
@@ -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;