diff options
author | mjg <mjg@FreeBSD.org> | 2014-07-06 23:27:13 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2014-07-06 23:27:13 +0000 |
commit | d74df80505e5aecd77377aaec7c1a99a08716af7 (patch) | |
tree | da79969ec8ec44d070d6a2f1c0b3e129e7fe30de /sys/kern/kern_exec.c | |
parent | 6763aa7bd25f654b3dc700a96e9e409f4c692dcd (diff) | |
download | FreeBSD-src-d74df80505e5aecd77377aaec7c1a99a08716af7.zip FreeBSD-src-d74df80505e5aecd77377aaec7c1a99a08716af7.tar.gz |
MFC r268002:
Call fdcloseexec right after fdunshare.
No functional changes.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index a129fca..19ba76d 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -598,6 +598,8 @@ interpret: * be shared after an exec. */ fdunshare(td); + /* close files on exec */ + fdcloseexec(td); /* * Malloc things before we need locks. @@ -611,8 +613,6 @@ interpret: bcopy(imgp->args->begin_argv, newargs->ar_args, i); } - /* close files on exec */ - fdcloseexec(td); vn_lock(imgp->vp, LK_SHARED | LK_RETRY); /* Get a reference to the vnode prior to locking the proc */ |