Subject: pty(4) inaccuracy?
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 04/04/2004 03:33:55
On looking at pty(4), I see that it says that when packet mode is in
use, "the presence of control status information to be read from the
master side may be detected by a select(2) for exceptional conditions".

However, on looking at selscan(), as called by sys_select(), it appears
to map select()'s execptional-conditions mask to the POLLRDBAND bit.
How abstractly correct this is is arguable, but the relevance at the
moment is that as far as I can tell, ptcpoll(), the poll routine in
tty_pty.c responsible for the master side of a pty, does not even
realize POLLRDBAND exists: a select() such as the manpage describes
will, I think, never trip.

I'd send-pr this, except I don't have any machine to actually test it
on, so there's the chance I've missed something.  Am I completely
confused, or is there a mismatch between documentation and reality
here?  (If someone can confirm the mismatch but doesn't want to do the
send-pr, I'll be happy to actually write up the PR.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B