From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 16:00:34 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 7DD97106566B; Mon, 8 Oct 2012 16:00:34 +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 689858FC08; Mon, 8 Oct 2012 16:00:34 +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 q98G0YM8029854; Mon, 8 Oct 2012 16:00:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98G0YYW029851; Mon, 8 Oct 2012 16:00:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210081600.q98G0YYW029851@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 8 Oct 2012 16:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241352 - stable/8/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: Mon, 08 Oct 2012 16:00:34 -0000 Author: jilles Date: Mon Oct 8 16:00:33 2012 New Revision: 241352 URL: http://svn.freebsd.org/changeset/base/241352 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/8/usr.bin/find/main.c Directory Properties: stable/8/usr.bin/find/ (props changed) Modified: stable/8/usr.bin/find/main.c ============================================================================== --- stable/8/usr.bin/find/main.c Mon Oct 8 14:08:13 2012 (r241351) +++ stable/8/usr.bin/find/main.c Mon Oct 8 16:00:33 2012 (r241352) @@ -154,7 +154,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));