MFC r259441:
Properly drain the TTY when both revoke(2) and close(2) end up closing the TTY.
This commit is contained in:
parent
6c90e2f6f5
commit
091cb7eeea
@ -191,8 +191,10 @@ ttydev_leave(struct tty *tp)
|
||||
|
||||
/* Drain any output. */
|
||||
MPASS((tp->t_flags & TF_STOPPED) == 0);
|
||||
if (!tty_gone(tp))
|
||||
tty_drain(tp);
|
||||
if (!tty_gone(tp)) {
|
||||
while (tty_drain(tp) == ERESTART)
|
||||
;
|
||||
}
|
||||
|
||||
ttydisc_close(tp);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user