On Thu, 2013-01-17 at 08:50 -0500, Greg Freemyer wrote:
Roger Oberholtzer <roger@opq.se> wrote:
I feel funny even asking the following, but I have a situation that I need to resolve. So, is there any chance we see data from before the open/flush() call?
Yes, there is a chance.
For rs-232 there is no kernel level concept of a connection. I don't know what the receiver does if data comes in without a open file handle, but the sending side can only send it or queue it up. If you are using rts/cts hardware flow control the data could easily be sitting in the sending device until you open the tty and raise cts.
And here is a key part - it depends on the hardware. You might have a traditional UART, a Cyclades board, a Digi board... so it is always best to assume with a serial connection that you might get some stray stuff (possibly even noise).
For sockets, there are not any kernel level queues on either side until the connection is established.
Sockets aren't hardware, so they are much more consistent. You should never see stray data. -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org