Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2014 23:27:14 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r268348 - stable/10/sys/kern
Message-ID:  <201407062327.s66NREiZ088016@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sun Jul  6 23:27:13 2014
New Revision: 268348
URL: http://svnweb.freebsd.org/changeset/base/268348

Log:
  MFC r268002:
  
  Call fdcloseexec right after fdunshare.
  
  No functional changes.

Modified:
  stable/10/sys/kern/kern_exec.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_exec.c
==============================================================================
--- stable/10/sys/kern/kern_exec.c	Sun Jul  6 23:26:34 2014	(r268347)
+++ stable/10/sys/kern/kern_exec.c	Sun Jul  6 23:27:13 2014	(r268348)
@@ -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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407062327.s66NREiZ088016>