http://bugs.winehq.org/show_bug.cgi?id=9425
--- Comment #18 from Ruediger Meier sweet_f_a@gmx.de 2012-02-05 14:00:35 CST --- (In reply to comment #17)
In your test code there are 2 wrong behaviors,
Actually the 2 wrong messages are the same case. You may change line 54 from "} {" into "} else {" (like it would be in real world). I'd removed that else to see if there are cases where return value is wrong but sets are correct nevertheless. In real world we wouldn't check that because usually we trust select :)
wine shows both of them while windows shows only the correct behavior?
Yes windows is always correct according to the documentation. Sometimes wine is also correct. Chances are better if you use a remote IP instead of localhost. Try 149.20.4.69 (kernel.org) - they are rejecting instead dropping.
Wine used to set the write FD wrongly if connection was refused but this was fixed.
What version got this fixed? Maybe the fix simply does not manage to set exceptfds instead of writefds sometimes.
cu, Rudi