msvcrt: Fix EOF behavior on read from pipe or console (take 2)

Dan Kegel dank at
Sat Feb 9 10:27:35 CST 2008

The canonical way to detect EOF on read is when
you request more than zero bytes, but zero bytes
come back.  Switching to this method seems to
handle a few problem cases better.
Also handle ERROR_BROKEN_PIPE properly just in case.

Thanks to Damjan Jovanovic for feedback and testing,
and Nguyễn Thái Ngọc Duy for the nudge.

Should fix
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pipe2.patch
Type: text/x-patch
Size: 4738 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list