summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-15 20:45:51 +0000
committered <ed@FreeBSD.org>2009-06-15 20:45:51 +0000
commitfa3d9801ccbe82d0e8899c7ae72239b16e3de03a (patch)
tree519410428f8b855c3c0a0ca66144f8150a9f9ca9 /sys/kern/tty.c
parent28b41377e3c91c195b215fdaa47a101f53811fe9 (diff)
downloadFreeBSD-src-fa3d9801ccbe82d0e8899c7ae72239b16e3de03a.zip
FreeBSD-src-fa3d9801ccbe82d0e8899c7ae72239b16e3de03a.tar.gz
Perform some more cleanups to in-kernel session handling.
The code that was in place in exit1() was mainly based on code from the old TTY layer. The main reason behind this, was because at one moment I ran a system that had two TTY layers in place at the same time. It is now sufficient to do the following: - Remove references from the session structure to the TTY vnode and the session leader. - If we have a controlling TTY and the session used by the TTY is equal to our session, send the SIGHUP. - If we have a vnode to the controlling TTY which has not been revoked, revoke it. While there, change sys/kern/tty.c to use s_ttyp in the comparison instead of s_ttyvp. It should not make any difference, because s_ttyvp can only become null when the session leader already left, but it's nicer to compare against the proper value.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index bf800be..2603cac 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1486,7 +1486,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td)
return (0);
}
- if (p->p_session->s_ttyvp != NULL ||
+ if (p->p_session->s_ttyp != NULL ||
(tp->t_session != NULL && tp->t_session->s_ttyvp != NULL &&
tp->t_session->s_ttyvp->v_type != VBAD)) {
/*
OpenPOWER on IntegriCloud