httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Thu, 24 Jan 2002 06:14:35 GMT
wrowe       02/01/23 22:14:35

  Modified:    server/mpm/winnt mpm_winnt.c
  Log:
    Improve error reporting a bit so we might start diagnosing any faults
    that might be introduced.
  
  Revision  Changes    Path
  1.208     +16 -10    httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.207
  retrieving revision 1.208
  diff -u -r1.207 -r1.208
  --- mpm_winnt.c	23 Jan 2002 18:34:30 -0000	1.207
  +++ mpm_winnt.c	24 Jan 2002 06:14:35 -0000	1.208
  @@ -671,11 +671,6 @@
       if (context == NULL) {
           /* allocate the completion context and the transaction pool */
           context = apr_pcalloc(pconf, sizeof(COMP_CONTEXT));
  -        if (!context) {
  -            ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), ap_server_conf,
  -                         "win9x_get_connection: apr_pcalloc() failed. Process will exit.");
  -            return NULL;
  -        }
           apr_pool_create(&context->ptrans, pconf);
       }
       
  @@ -1291,20 +1286,22 @@
   
       /* Make our end of the handle non-inherited */
       if (DuplicateHandle(hCurrentProcess, hPipeWrite, hCurrentProcess,
  -                        &hPipeWriteDup, 0, FALSE, DUPLICATE_SAME_ACCESS))
  -    {
  +                        &hPipeWriteDup, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
           CloseHandle(hPipeWrite);
           hPipeWrite = hPipeWriteDup;
       }
  +    else {
  +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
  +                     "Parent: Unable to duplicate pipe to child.\n");
  +    }
   
       /* Open a null handle to soak info from the child */
       hNullOutput = CreateFile("nul", GENERIC_READ | GENERIC_WRITE, 
                                FILE_SHARE_READ | FILE_SHARE_WRITE, 
                                &sa, OPEN_EXISTING, 0, NULL);
       if (hNullOutput == INVALID_HANDLE_VALUE) {
  -        ap_log_error(APLOG_MARK, APLOG_CRIT, APR_FROM_OS_ERROR(rv), ap_server_conf,
  +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
                        "Parent: Unable to create null output pipe for child process.\n");
  -        return -1;
       }
   
       /* Child's initial stderr -> our main server error log (or, failing that, stderr)
*/
  @@ -1320,9 +1317,18 @@
                   rv = apr_get_os_error();
               }
           }
  -        if (rv != APR_SUCCESS || hShareError == INVALID_HANDLE_VALUE) {
  +        if (rv != APR_SUCCESS) {
  +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
  +                         "Parent: Unable to share error log with child.\n");
  +        }
  +        else if (hShareError == INVALID_HANDLE_VALUE) {
  +            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_CRIT, 0, ap_server_conf,
  +                         "Parent: Failed to share error log with child.\n");
  +        }
  +        else {
               hShareError = GetStdHandle(STD_ERROR_HANDLE);
           }
  +
       }
   
       /* Give the read end of the pipe (hPipeRead) to the child as stdin. The 
  
  
  

Mime
View raw message