Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Oct 2012 15:36:30 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r241227 - stable/9/usr.bin/find
Message-ID:  <201210051536.q95FaUeI094166@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Fri Oct  5 15:36:30 2012
New Revision: 241227
URL: http://svn.freebsd.org/changeset/base/241227

Log:
  MFC r240973: find: Do not pass fd to save current directory to child
  processes.
  
  This removes one of the two wrongly passed file descriptors. The other one
  appears to be from fts(3).

Modified:
  stable/9/usr.bin/find/main.c
Directory Properties:
  stable/9/usr.bin/find/   (props changed)

Modified: stable/9/usr.bin/find/main.c
==============================================================================
--- stable/9/usr.bin/find/main.c	Fri Oct  5 14:43:49 2012	(r241226)
+++ stable/9/usr.bin/find/main.c	Fri Oct  5 15:36:30 2012	(r241227)
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
 		usage();
 	*p = NULL;
 
-	if ((dotfd = open(".", O_RDONLY, 0)) < 0)
+	if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
 		err(1, ".");
 
 	exit(find_execute(find_formplan(argv), start));



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