Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 70588 invoked by uid 500); 16 Oct 2001 12:30:23 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 70570 invoked from network); 16 Oct 2001 12:30:23 -0000 Date: 16 Oct 2001 12:24:33 -0000 Message-ID: <20011016122433.56382.qmail@icarus.apache.org> From: trawick@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/file_io/win32 readwrite.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N trawick 01/10/16 05:24:33 Modified: . CHANGES file_io/win32 readwrite.c Log: read_with_timeout in apr/file_io/win32/readwrite.c incorrectly returned APR_SUCCESS instead of APR_EOF when PeekNamedPipe failed and the result from GetLastError() was ERROR_BROKEN_PIPE. Because of this, the pipe wasn't closed as soon as it could be. Submitted by: Tim Costello Reviewed by: Jeff Trawick Revision Changes Path 1.172 +6 -0 apr/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apr/CHANGES,v retrieving revision 1.171 retrieving revision 1.172 diff -u -r1.171 -r1.172 --- CHANGES 2001/10/16 12:21:52 1.171 +++ CHANGES 2001/10/16 12:24:32 1.172 @@ -1,5 +1,11 @@ Changes with APR b1 + *) read_with_timeout in apr/file_io/win32/readwrite.c incorrectly + returned APR_SUCCESS instead of APR_EOF when PeekNamedPipe failed + and the result from GetLastError() was ERROR_BROKEN_PIPE. Because + of this, the pipe wasn't closed as soon as it could be. + [Tim Costello ] + *) Fix a problem in the Win32 pipe creation code called by apr_proc_create(): It didn't register cleanups for either the read or the write ends of the pipe, so file handles (and event 1.62 +1 -1 apr/file_io/win32/readwrite.c Index: readwrite.c =================================================================== RCS file: /home/cvs/apr/file_io/win32/readwrite.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- readwrite.c 2001/08/28 01:56:09 1.61 +++ readwrite.c 2001/10/16 12:24:33 1.62 @@ -89,7 +89,7 @@ &dwBytesLeftThisMsg)) { // pointer to unread bytes in this message rv = apr_get_os_error(); if (rv == APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE)) - return APR_SUCCESS; + return APR_EOF; } else { if (dwBytesRead == 0) {