sgarg> I am doing serial programming under Linux/SCO. The system is
sgarg> communicating with another system and sometimes I get spurious
sgarg> bytes when I try to read the serial device. What I am looking
sgarg> for is a way to flush the input buffers of the UART between
sgarg> two consecutive reads.
sgarg> I wonder how can one do that.
Look at tcflush()
comp.unix.programmer FAQ: see <URL: http://www.erlenstar.demon.co.uk/unix/>
or <URL: http://www.whitefang.com/unix/>