xargs exit status

Bug #27824 reported by Peter Miller on 2006-01-01
Affects Status Importance Assigned to Milestone
findutils (Ubuntu)

Bug Description

i386 up-to-date 5.10 Breasy Ubuntu, findutils 4.2.22-2

The xargs command is not returning the correct exit status if a sub-process has
a non-zero exit status.

$ false
echo $?
$ echo hello | xargs false
echo $?

This contradicts the man page...

       xargs exits with the following status:
       0 if it succeeds
       123 if any invocation of the command exited with status 1-125
       124 if the command exited with status 255
       125 if the command is killed by a signal
       126 if the command cannot be run
       127 if the command is not found
       1 if some other error occurred."

Thus, the false example above should have given an exit status of 123.

Matt Zimmerman (mdz) wrote :

Seems to be behaving correctly in current Dapper:

mizar:[~] echo hello | xargs false
zsh: done echo hello |
zsh: exit 123 xargs false
mizar:[~] echo $?

Please reopen if you find otherwise.

Changed in findutils:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.