apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Am I hitting the list?
Date Sat, 01 Sep 2007 07:35:04 GMT
Steven Nairn wrote:
> 
> The "testfile" failure on win32 is in test_gets_buffered() because
> read_with_timeout() (in file_io/win32/readwrite.c) does not correctly
> report end of file when the file is opened with the APR_FOPEN_XTHREAD
> flag.
> 
> The fix is to check for ERROR_HANDLE_EOF in read_with_timeout()
> (attached patch).

Very nice catch, this is applied to 0.9, 1.2 and trunk now.

Thank you again Steven!

> ------------------------------------------------------------------------
> 
> --- file_io/win32/readwrite.c-orig	Thu Aug  3 17:16:41 2006
> +++ file_io/win32/readwrite.c	Fri Aug 31 10:55:08 2007
> @@ -122,6 +122,9 @@
>          if (rv == APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE)) {
>              /* Assume ERROR_BROKEN_PIPE signals an EOF reading from a pipe */
>              rv = APR_EOF;
> +        } else if (rv == APR_FROM_OS_ERROR(ERROR_HANDLE_EOF)) {
> +            /* Did we hit EOF reading from the handle? */
> +            rv = APR_EOF;
>          }
>      }
>      


Mime
View raw message