diff options
Diffstat (limited to 'sys/i386/ibcs2/ibcs2_fcntl.c')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_fcntl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/ibcs2_fcntl.c b/sys/i386/ibcs2/ibcs2_fcntl.c index a54d40a..07b7f41 100644 --- a/sys/i386/ibcs2/ibcs2_fcntl.c +++ b/sys/i386/ibcs2/ibcs2_fcntl.c @@ -194,10 +194,11 @@ ibcs2_open(td, uap) PROC_LOCK(p); if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { struct file *fp; + int error; - fp = ffind_hold(td, td->td_retval[0]); + error = fget(td, td->td_retval[0], &fp); PROC_UNLOCK(p); - if (fp == NULL) + if (error) return (EBADF); /* ignore any error, just give it a try */ |