You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Michael Watkins <co...@hotmail.com> on 2008/04/04 02:37:13 UTC

apr_file_read never hits EOF under Vista with Overlapped I/O

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.
 
 
Regards,
 
Michael Watkins
_________________________________________________________________
More immediate than e-mail? Get instant access with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_instantaccess_042008