doc: clarify again exit status handling of -exec command {} +

A non-zero exit status of a command launched via the -exec predicate
family only leads to a non-zero exit status of 'find' itself when
the '+' form of the punctuation for the command is used.  This is
also what POSIX requires [1].
To put it the other way round: when the ';' form is used, the exit
status of 'find' is not affected.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

* find/find.1 (-exec ... +): Explicitly mention that the exit status of
the launched command affects find's exit status when the '+' form is used.
To allow a future change, deliberately leave the behavior for failing
commands with the ';' form undocumented.
(-execdir): Likewise.
Previously, in the form committed with v4.6.0-63-gae424b95, that sentence
did not explicitly limit the behavior to the '+' form, and therefore
might have confused the user.

Fixes https://sv.gnu.org/bugs/?54509
This commit is contained in:
Bernhard Voelker 2018-08-14 22:33:50 +02:00
parent 5dae49b4fc
commit 77ff826985

View File

@ -1151,7 +1151,7 @@ the command, and (when
is being invoked from a shell) it should be quoted (for
example, \(aq{}\(aq) to protect it from interpretation by shells. The
command is executed in the starting directory. If any invocation
returns a non-zero value as exit status, then
with the `+' form returns a non-zero value as exit status, then
.B find
returns a non-zero exit status. If
.B find
@ -1191,7 +1191,8 @@ appropriately-named file in a directory in which you will run
The same applies to having entries in
.B $PATH
which are empty or which are not absolute directory names. If
any invocation returns a non-zero value as exit status, then
any invocation with the `+' form returns a non-zero value as exit status,
then
.B find
returns a non-zero exit status. If
.B find