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.
This commit is contained in:
parent
e1c6a283f3
commit
b547523eb4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264411
@ -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
|
||||
|
@ -1781,7 +1781,7 @@ int
|
||||
f_quit(PLAN *plan __unused, FTSENT *entry __unused)
|
||||
{
|
||||
finish_execplus();
|
||||
exit(0);
|
||||
exit(exitstatus);
|
||||
}
|
||||
|
||||
/* c_quit == c_simple */
|
||||
|
Loading…
Reference in New Issue
Block a user