Setting termios VMIN > 0 and VTIME > 0 on non blocking file

Åke Rehnman ake.rehnman@gmail.com
Thu Mar 12 01:04:34 GMT 2020


On 2020-03-11 22:55, Brian Inglis wrote:
> VMIN > 0 || VTIME > 0 implies blocking; O_NONBLOCK implies SIGIO 
> delivery; see:
> 	https://www.tldp.org/HOWTO/pdf/Serial-Programming-HOWTO.pdf
> 	https://www.cmrr.umn.edu/~strupp/serial.html
> 	https://en.wikibooks.org/wiki/Serial_Programming/termios
>
> also read the man pages carefully and *assume* nothing; functions should work
> *exactly* as documented: there be dragons!
>
According to https://www.cmrr.umn.edu/~strupp/serial.html "*Timeouts are 
ignored in canonical input mode or when the/NDELAY/option is set on the 
file via/open/or/fcntl/."*

This leads me to believe the current cygwin implementation is not 
correct. Changing the VMIN and VTIME should have no effect on the read() 
behavior if the file was opened with O_NOBLOCK.
**

*
*




More information about the Cygwin mailing list