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

Norton Allen allen@huarp.harvard.edu
Thu Mar 12 01:08:03 GMT 2020


On 3/11/2020 9:04 PM, Åke Rehnman via Cygwin wrote:
>
> 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.
> ** 


Correct me if I am wrong, but O_NDELAY is not the same as O_NONBLOCK




More information about the Cygwin mailing list