Setting termios VMIN > 0 and VTIME > 0 on non blocking file
Thomas Dickey
dickey@his.com
Thu Mar 12 08:05:56 GMT 2020
----- Original Message -----
| From: "Åke Rehnman" <ake.rehnman@gmail.com>
| To: "cygwin" <cygwin@cygwin.com>
| Sent: Wednesday, March 11, 2020 4:48:05 PM
| Subject: Setting termios VMIN > 0 and VTIME > 0 on non blocking file
| Hello all,
|
| opening a file (serial port) with O_NONBLOCK and subsequently setting
| termios VMIN and VTIME > 0 makes read() never ever return any data
| (returns EAGAIN indefinitely).
|
| Don't ask my why one would want to do something like this but apparently
| the "screen" program think this is a good way of doing things...
|
| Nevertheless not returning any data ever seems wrong.
|
| Any insight on how it is supposed to work is welcome.
If not "correct", it's certainly inconsistent with all other systems.
I noticed it recently:
https://invisible-island.net/ncurses/tack/CHANGES.html#t20200220
https://github.com/cygwinports/tack/issues/1
It's either recently-broken, or just coincidence :-)
--
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://ftp.invisible-island.net
More information about the Cygwin
mailing list