From owner-svn-src-head@FreeBSD.ORG Sun Apr 13 11:47:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA21C596; Sun, 13 Apr 2014 11:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A738315EF; Sun, 13 Apr 2014 11:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DBlI8j009961; Sun, 13 Apr 2014 11:47:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DBlIjw009959; Sun, 13 Apr 2014 11:47:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404131147.s3DBlIjw009959@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 13 Apr 2014 11:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264411 - head/usr.bin/find X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 11:47:18 -0000 Author: jilles Date: Sun Apr 13 11:47:17 2014 New Revision: 264411 URL: http://svnweb.freebsd.org/changeset/base/264411 Log: find: Return normal exit status from -quit. If there was an error, make the exit status reflect this even if -quit caused the exit. Formerly, -quit always caused exit(0). GNU find does the same. Modified: head/usr.bin/find/find.1 head/usr.bin/find/function.c Modified: head/usr.bin/find/find.1 ============================================================================== --- head/usr.bin/find/find.1 Sun Apr 13 11:35:42 2014 (r264410) +++ head/usr.bin/find/find.1 Sun Apr 13 11:47:17 2014 (r264411) @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd April 12, 2014 +.Dd April 13, 2014 .Dt FIND 1 .Os .Sh NAME @@ -778,7 +778,7 @@ option was specified. .It Ic -quit Causes .Nm -to immediately terminate successfully. +to terminate immediately. .It Ic -regex Ar pattern True if the whole path of the file matches .Ar pattern Modified: head/usr.bin/find/function.c ============================================================================== --- head/usr.bin/find/function.c Sun Apr 13 11:35:42 2014 (r264410) +++ head/usr.bin/find/function.c Sun Apr 13 11:47:17 2014 (r264411) @@ -1781,7 +1781,7 @@ int f_quit(PLAN *plan __unused, FTSENT *entry __unused) { finish_execplus(); - exit(0); + exit(exitstatus); } /* c_quit == c_simple */