From 318bef9e03cb60ccdd29f61c5d7667655a6433c2 Mon Sep 17 00:00:00 2001 From: kstailey Date: Fri, 29 Aug 1997 17:59:52 +0000 Subject: if O_NOCTTY is supplied to open(2) do *not* aquire a controlling tty --- sys/compat/svr4/svr4_fcntl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/compat/svr4/svr4_fcntl.c') diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c index aec986a376c..91a269cc917 100644 --- a/sys/compat/svr4/svr4_fcntl.c +++ b/sys/compat/svr4/svr4_fcntl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_fcntl.c,v 1.6 1997/08/07 09:16:20 niklas Exp $ */ +/* $OpenBSD: svr4_fcntl.c,v 1.7 1997/08/29 17:59:51 kstailey Exp $ */ /* $NetBSD: svr4_fcntl.c,v 1.14 1995/10/14 20:24:24 christos Exp $ */ /* @@ -261,7 +261,7 @@ svr4_sys_open(p, v, retval) if (error) return error; - if ((SCARG(&cup, flags) & O_NOCTTY) && SESS_LEADER(p) && + if (!(SCARG(&cup, flags) & O_NOCTTY) && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { struct filedesc *fdp = p->p_fd; struct file *fp = fdp->fd_ofiles[*retval]; -- cgit v1.2.3