Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Apr 2014 11:47:18 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264411 - head/usr.bin/find
Message-ID:  <201404131147.s3DBlIjw009959@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



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