Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 99488 invoked by uid 500); 11 Feb 2002 15:46:45 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 99476 invoked by uid 500); 11 Feb 2002 15:46:45 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 11 Feb 2002 15:46:44 -0000 Message-ID: <20020211154644.64919.qmail@icarus.apache.org> From: stoddard@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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=");