diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_pty.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 51daa1385a4..f09fb28df82 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.92 2019/03/06 09:36:27 tb Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.93 2019/03/11 17:13:31 anton Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -678,6 +678,12 @@ filt_ptcread(struct knote *kn, long hint) ((pti->pt_flags & PF_UCNTL) && pti->pt_ucntl)) kn->kn_data++; } + + if (!ISSET(tp->t_state, TS_CARR_ON)) { + kn->kn_flags |= EV_EOF; + return (1); + } + return (kn->kn_data > 0); } |