diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-03-23 15:22:48 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-04-21 15:45:50 +0000 |
| commit | 44077c07f19f5e60593dcd87f7c2c33ea7e5ca69 (patch) | |
| tree | a2c4320d31046ae425daf02aebc2ebd95795c2b9 /sys | |
| parent | f37c6e3a133e37c742b23ba646b710492603bc51 (diff) | |
Diffstat (limited to 'sys')
| -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 b1b3b268d0e9..a968762d6167 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1262,6 +1262,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); |
