Q re Fedora (5,7) RS232 serial RxD timeouts namely c_cc[VMIN] c_cc[VTIME] and open(.... O_NONBLOCK O_NDELAY);

Alan Cox alan at lxorguk.ukuu.org.uk
Sat May 3 14:58:42 UTC 2008


>    open without O_NDELAY:-           VMIN=50, VTIME=50     read completes OK with correct 49 bytes of data.
>    open without O_NDELAY:-           VMIN=49, VTIME=50     OK same as above
>    open without O_NDELAY:-           VMIN=48, VTIME=50     hangs infinitely even though sniffer shows correct 49 byte response.
>    open without O_NDELAY:-           VMIN=0,   VTIME=50     hangs infinitely even though sniffer shows correct 49 byte response.

Do you have test case code for this you can share. That code hasn't
changed for years so the bug report suprises me, but it is possible (in
fact nowdays likely) that nobody is using that obscure feature of SYSV
termio or possibly that specific bit broke in the bit tty revamp and
wasnt caught as its so rarely used.

What hardware are you testing with ?

> Does anybody have an example of a non-canonical read from a RS232 serial port which actually *will* timeout under Fedora 7?

Should be sufficient to do (for testing)

stty -icanon min 48 time 50 -echo </dev/ttyfoo 
od -x /dev/ttyfoo

Alan




More information about the fedora-list mailing list