Yes. But now please explain how to read asynchronously from stdin without setting it in nonblocking mode with that 'sanity' check in place?
/ Per Hedbor ()
Previous text:
2003-03-19 13:53: Subject: I/O callbacks in blocking mode
You really mean stdin, not tty:s in general, right? At least I'm not aware of any problem opening /dev/tty and setting it in nonblocking mode.
Setting stdio fd:s into non-blocking mode is always more or less unfriendly to the environment.
/ Niels Möller ()