This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Am 29.04.2010 12:53, schrieb Thomas Wolff:Oh, right, so apparently Linux is wrong here (since it does not report read availability...).
[on closed terminal]
On Linux, select() indicates an exception and EIO.
On SunOS, select() indicates both an exception and input (weird),
Not weird, you appear to be misunderstanding select(). An IEEE Std 1003.1 compliant select():
- only states that a subsequent read() will *not block* this includes EOF and error, as they make read() return without blocking)
- makes *no statements about success*
So I could setup alarm() to get myself signal()ed while waiting in a long sleep().Pointers for workarounds: alarm(), signal().On Cygwin, the following is observed: * EOF is not signalled on read(); rather EIO is indicated right away. (Maybe not too bad, an application can handle that as well.) * select() with timeout hangs.
Especially the latter can hardly be handled by an application.
------ Thomas
-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |