fix async read on mailslots

Ambroz Bizjak ambro at b4ever.net
Thu Jul 17 19:33:16 CDT 2008


Hi,
In Wine creating a mailslot (CreateMailslot) with non-zero timeout
(argument 3 to CreateMailslot) and then attempting an asynchronous read on
it will cause a synchronous read to be performed - ReadFile will block
instead of failing with ERROR_IO_PENDING.

I'm attaching a fix as suggested by jil and a test.
The test creates an empty mailbox with a small timeout and performs an
asynchronous read - if broken, it will fail with ERROR_SEM_TIMEOUT.
I've also tried the test on Vista.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-mailslot-test.patch
Type: application/octet-stream
Size: 1884 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080718/6c3ca527/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-mailslot.patch
Type: application/octet-stream
Size: 582 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080718/6c3ca527/attachment-0001.obj 


More information about the wine-patches mailing list