diff options
author | tanimura <tanimura@FreeBSD.org> | 2002-03-11 07:53:13 +0000 |
---|---|---|
committer | tanimura <tanimura@FreeBSD.org> | 2002-03-11 07:53:13 +0000 |
commit | 22c75bf1c95925ca749760aa92580541ac2e6196 (patch) | |
tree | 67cbceb5f52dfde68f8a75843701d4ce255820e6 /sys/kern/tty.c | |
parent | b9e49bfcc91fc2e10b17f9bec70d4d4cfb27ad51 (diff) | |
download | FreeBSD-src-22c75bf1c95925ca749760aa92580541ac2e6196.zip FreeBSD-src-22c75bf1c95925ca749760aa92580541ac2e6196.tar.gz |
Stop abusing the pgrpsess_lock.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 1d5ecdb..923923a 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1041,11 +1041,11 @@ ttioctl(tp, cmd, data, flag) break; case TIOCSCTTY: /* become controlling tty */ /* Session ctty vnode pointer set in vnode layer. */ - PGRPSESS_XLOCK(); + PGRPSESS_SLOCK(); if (!SESS_LEADER(p) || ((p->p_session->s_ttyvp || tp->t_session) && (tp->t_session != p->p_session))) { - PGRPSESS_XUNLOCK(); + PGRPSESS_SUNLOCK(); return (EPERM); } tp->t_session = p->p_session; @@ -1056,7 +1056,7 @@ ttioctl(tp, cmd, data, flag) PROC_LOCK(p); p->p_flag |= P_CONTROLT; PROC_UNLOCK(p); - PGRPSESS_XUNLOCK(); + PGRPSESS_SUNLOCK(); break; case TIOCSPGRP: { /* set pgrp of tty */ register struct pgrp *pgrp; |