On the other hand, it seems to have fixed all those annoying little
messages from pppd: tcgetattr: I/O error, because my monitor process
prevents the port being shutdown on hangup. (pppd-2.2.0c)
That's a bug in pppd; it shouldn't be logging that error in the first
place.
Obviously, it is meaningless for two processes to have the same port
open for I/O, which is why there are lockfiles etc, but
I've certainly found the ability to monitor the port useful, so if there
is a way to let a process do ioctls etc, immune from hangups etc, then
please do revisit the hangup code.
Once a hangup occurs, the process doesn't have the port open for I/O.
That's the way it is for security reasons. What would be useful for
your port monitoring program will also be useful to an attacker who
wishes to run a port monitoring program....
- Ted