summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2014-07-06 23:27:13 +0000
committermjg <mjg@FreeBSD.org>2014-07-06 23:27:13 +0000
commitd74df80505e5aecd77377aaec7c1a99a08716af7 (patch)
treeda79969ec8ec44d070d6a2f1c0b3e129e7fe30de
parent6763aa7bd25f654b3dc700a96e9e409f4c692dcd (diff)
downloadFreeBSD-src-d74df80505e5aecd77377aaec7c1a99a08716af7.zip
FreeBSD-src-d74df80505e5aecd77377aaec7c1a99a08716af7.tar.gz
MFC r268002:
Call fdcloseexec right after fdunshare. No functional changes.
-rw-r--r--sys/kern/kern_exec.c4
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 */
OpenPOWER on IntegriCloud