From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 15:36:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EACF61065670; Fri, 5 Oct 2012 15:36:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D54AE8FC17; Fri, 5 Oct 2012 15:36:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95FaUsC094168; Fri, 5 Oct 2012 15:36:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95FaUeI094166; Fri, 5 Oct 2012 15:36:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210051536.q95FaUeI094166@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 5 Oct 2012 15:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241227 - stable/9/usr.bin/find X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 15:36:31 -0000 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));