diff options
author | jhb <jhb@FreeBSD.org> | 2001-01-23 23:59:38 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-01-23 23:59:38 +0000 |
commit | 80649f2bc14466af487fac64c40a88ede7c20efc (patch) | |
tree | 781ea883b6ed60cc23e615d8c1d3f2f82b901dd5 /sys/i386/ibcs2/ibcs2_fcntl.c | |
parent | f5fbc62142d116619713e03561896c38676e6f5c (diff) | |
download | FreeBSD-src-80649f2bc14466af487fac64c40a88ede7c20efc.zip FreeBSD-src-80649f2bc14466af487fac64c40a88ede7c20efc.tar.gz |
Proc locking.
Diffstat (limited to 'sys/i386/ibcs2/ibcs2_fcntl.c')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_fcntl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/i386/ibcs2/ibcs2_fcntl.c b/sys/i386/ibcs2/ibcs2_fcntl.c index 88c9c1d..61c37cc 100644 --- a/sys/i386/ibcs2/ibcs2_fcntl.c +++ b/sys/i386/ibcs2/ibcs2_fcntl.c @@ -188,14 +188,17 @@ ibcs2_open(p, uap) ret = spx_open(p, uap); } else #endif /* SPX_HACK */ + PROC_LOCK(p); if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { struct filedesc *fdp = p->p_fd; struct file *fp = fdp->fd_ofiles[p->p_retval[0]]; + PROC_UNLOCK(p); /* ignore any error, just give it a try */ if (fp->f_type == DTYPE_VNODE) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, p); - } + } else + PROC_UNLOCK(p); return ret; } |