svn commit: r264411 - head/usr.bin/find
Jilles Tjoelker
jilles at FreeBSD.org
Sun Apr 13 11:47:18 UTC 2014
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 */
More information about the svn-src-head
mailing list