Re: Bug in serial line hangup code ?

Theodore Y. Ts'o (tytso@mit.edu)
Mon, 6 May 1996 14:16:51 -0400


From: Peter Fox <fox@roestock.demon.co.uk>
Date: Sun, 5 May 1996 13:45:11 GMT

ppp enables hangup, and on hangup closes the port. The serial driver
sets info.count to 0 on hangup, even though my program still has the
port open. As my program watches info.count to determine if another
process has the line is open, this is a bit of a problem.

This is the way the serial driver is *designed*. Once a hangup has
occurred, programs do not logically have the port "open". Access to the
file descriptors has been revoked, and so they no longer can read or
write to the serial port.

Furthermore, the design goal is upon hangup to shutdown the serial port
entirely. This guarantees that upon a vhangup(), the modem line is
dropped. Your patches change this.

How about including this lot before 2.0 ?

Your patches could potentially break all manner of programs that assume
the current behavior. I am willing to revisit the design of the entire
tty hangup behavior, but this will involve changing more than just the
serial driver --- and just before 2.0 is not a good time to do this.

- Ted