httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Mon, 11 Feb 2002 15:46:44 GMT
stoddard    02/02/11 07:46:44

  Modified:    server/mpm/winnt mpm_winnt.c
  Log:
  Win32: Handles returned by GetStdHandle are psuedo handles and should never be
  passed to a CloseHandle call.
  
  Revision  Changes    Path
  1.232     +6 -1      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.231
  retrieving revision 1.232
  diff -u -r1.231 -r1.232
  --- mpm_winnt.c	11 Feb 2002 15:40:07 -0000	1.231
  +++ mpm_winnt.c	11 Feb 2002 15:46:44 -0000	1.232
  @@ -1600,7 +1600,12 @@
       CloseHandle(pi.hThread);
       CloseHandle(hPipeRead);
       CloseHandle(hNullOutput);
  -    CloseHandle(hShareError);
  +    if (GetStdHandle(STD_ERROR_HANDLE) != hShareError) {
  +        /* Handles opened with GetStdHandle are psuedo handles
  +         * and should not be closed else bad things will happen.
  +         */
  +        CloseHandle(hShareError);
  +    }
       _putenv("AP_PARENT_PID=");
       _putenv("AP_MY_GENERATION=");
   
  
  
  

Mime
View raw message