kernel and serial ports

Wakko Warner (wakko@animx.eu.org)
Mon, 6 Sep 1999 11:03:58 -0400


I've been working on a program that accepts network connections, unix socket
connections and does rw on a serial port. Is there any way to guarantee the
data from the serial port will reach the program if it's busy (say for 1
second) and can't read the serial port? I noticed that a ~200ms delay
between write and read will not have any data waiting (say the write causes
the serial device to return with 4 characters).

I am currently opening the port O_RDWR | O_NONBLOCK and setting the speed
to 2400 (this is the only speed the serial device supports). There is no
hw handshaking supported in the device. Would it be better to have a child
process dedicated to reading the port instead of having one process to
listen for connections and data from the port?

-- 
 Lab tests show that use of micro$oft causes cancer in lab animals

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/