The ICANON flag is an lflag, not an iflag.

Submitted by:	Neelkanth Natu <neelnatu@yahoo.com>
MFC after:	3 days
This commit is contained in:
Matthew Dillon 2002-02-18 06:07:11 +00:00
parent 8654c84817
commit 5638baf0c6

View File

@ -504,7 +504,7 @@ ptcpoll(dev, events, td)
((pti->pt_flags & PF_REMOTE) ?
(tp->t_canq.c_cc == 0) :
((tp->t_rawq.c_cc + tp->t_canq.c_cc < TTYHOG - 2) ||
(tp->t_canq.c_cc == 0 && (tp->t_iflag & ICANON)))))
(tp->t_canq.c_cc == 0 && (tp->t_lflag & ICANON)))))
revents |= events & (POLLOUT | POLLWRNORM);
if (events & POLLHUP)
@ -596,7 +596,7 @@ again:
}
while (cc > 0) {
if ((tp->t_rawq.c_cc + tp->t_canq.c_cc) >= TTYHOG - 2 &&
(tp->t_canq.c_cc > 0 || !(tp->t_iflag&ICANON))) {
(tp->t_canq.c_cc > 0 || !(tp->t_lflag&ICANON))) {
wakeup(TSA_HUP_OR_INPUT(tp));
goto block;
}