diff options
| author | Bernhard Voelker <mail@bernhard-voelker.de> | 2018-08-14 22:33:50 +0200 |
|---|---|---|
| committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2018-08-14 22:45:51 +0200 |
| commit | 77ff826985a1abb6fac9bcd916d1840662d44df3 (patch) | |
| tree | de07fa2a3732c15ab2d96407d00512bfe65fbc45 | |
| parent | 5dae49b4fc7fd82583d6be033907f693e9832f83 (diff) | |
| download | findutils-77ff826985.tar.gz | |
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
| -rw-r--r-- | find/find.1 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/find/find.1 b/find/find.1 index bf13a26..a9e12a3 100644 --- a/find/find.1 +++ b/find/find.1 @@ -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 |
