diff options
Diffstat (limited to 'sys/kern/tty.c')
| -rw-r--r-- | sys/kern/tty.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index c8e2c561b7cf..356a69682997 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1261,6 +1261,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); |
