xargs exit status

Bug #27824 reported by Peter Miller
12
Affects Status Importance Assigned to Milestone
findutils (Ubuntu)
Fix Released
Medium
Unassigned

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.
Example...

$ false
echo $?
1
$ echo hello | xargs false
echo $?
0
$

This contradicts the man page...

"EXIT STATUS
       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.

Revision history for this message
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 $?
123

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  
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.