http://bugs.winehq.org/show_bug.cgi?id=10056
Summary: False error on serial port read Product: Wine Version: CVS/GIT Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: wine-kernel AssignedTo: wine-bugs@winehq.org ReportedBy: adrian@humboldt.co.uk
Created an attachment (id=8604) --> (http://bugs.winehq.org/attachment.cgi?id=8604) An internal hack used to work around the problem.
We use an application which reads from a serial port or emulated serial port. This stopped working with recent versions of Wine, and bisection tracked it down to this commit:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=539d5863e6fae78943fe59...
This commit makes NtReadFile() return STATUS_PIPE_BROKEN whenever the read() system call returns 0. Unfortunately, Wine sets VMIN to 0, forcing read() to return 0 whenever there is no data available:
http://source.winehq.org/source/dlls/ntdll/serial.c#L752
Our application sees STATUS_PIPE_BROKEN, and immediately fails.
I've attached a patch which we use to work around this problem, but I'd like to work towards a more elegant solution.