Subject: Re: tty layer bogons from the depths of the abyss
To: None <mycroft@mit.edu>
From: Michael Eriksson T/D <Michael.Eriksson@era-t.ericsson.se>
List: tech-kern
Date: 03/31/1998 15:56:30
(This is a reply to a mail sent 12 days ago, as I've been away.)

> Since your change doesn't affect the behaviour of ISOPEN (namely, that
> it's always on as long as the device is open), the ZOMBIE bit has
> effectively the same semantics as the changes I proposed.  The only
> difference is in the POLLOUT/POLLWRNORM semantics, which I believe is
> incorrect, because it makes the semantics of POLLOUT/POLLWRNORM
> different from an actual write(2).

But the semantics of write(2) is that it hangs if the carrier is off
(and CLOCAL isn't set). The old (current) version of ttpoll() lets
select return that write is ok even if the carrier isn't set, but the
write(2) call will hang. I argue that these semantics clash, and that
my patches fix this.

What I am after is to be able to do select(2) on a tty to wait for the
carrier. How do I do that with the current tty code?

Also, did you look into the calls to ttwakeup()? Is it really
necessary to call ttwakeup() for each incoming character, even if
there already are characters in the queue (t_rawq or t_canq)?

/Michael