summaryrefslogtreecommitdiff
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-05-06 18:13:11 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-05-06 18:13:11 +0000
commitdfd5dee1b0cf927c9d59de8e423325603f86b500 (patch)
treeb8fae917f3fe139609bec4915b6cbc239974a255 /sys/kern/tty.c
parent5f0d05904c70c58e07d4fd7fa4570840fbd9afda (diff)
Notes
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index e732834babaf..42011962fb60 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
- * $Id: tty.c,v 1.115 1999/02/19 19:34:49 luoqi Exp $
+ * $Id: tty.c,v 1.116 1999/04/27 11:16:17 phk Exp $
*/
/*-
@@ -1069,19 +1069,20 @@ ttypoll(tp, events, p)
| POLLHUP);
s = spltty();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (ttnread(tp) > 0 || ISSET(tp->t_state, TS_ZOMBIE))
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &tp->t_rsel);
-
- if (events & (POLLOUT | POLLWRNORM))
+ }
+ if (events & (POLLOUT | POLLWRNORM)) {
if ((tp->t_outq.c_cc <= tp->t_olowat &&
ISSET(tp->t_state, TS_CONNECTED))
|| ISSET(tp->t_state, TS_ZOMBIE))
revents |= events & (POLLOUT | POLLWRNORM);
else
selrecord(p, &tp->t_wsel);
+ }
splx(s);
return (revents);
}