apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watkins <conden...@hotmail.com>
Subject apr_file_read never hits EOF under Vista with Overlapped I/O
Date Fri, 04 Apr 2008 00:37:13 GMT

Apparently under Windows Vista, the read_with_timeout() call does not handle the case where
the error is ERROR_IO_PENDING, the WaitForSingleObject() completes, but GetOverlappedResult()
sets the nbytes value to zero.
For the normal branch, if nbytes is zero the return value is set to APR_EOF.
For the Overlapped case (readwrite.c line 96) the return value is always set to APR_SUCCESS.
 Under Windows XP, the code works fine.  But under Windows Vista the code needs to check for
nbytes being zero, and for that case setting the rv value to APR_EOF.
Michael Watkins
More immediate than e-mail? Get instant access with Windows Live Messenger.
View raw message