URL: <http://savannah.gnu.org/bugs/?38658>
Summary: If the command exec() fails, xargs terminates prematurely Project: findutils Submitted by: famzah Submitted on: Thu 04 Apr 2013 11:52:23 AM GMT Category: xargs Severity: 3 - Normal Item Group: Wrong result Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: 4.4.2 Fixed Release: None _______________________________________________________ Details: Here is an example: $ echo 1 2 3 4 5 6 | xargs -n 1 badexec-name xargs: badexec-name: No such file or directory What I expect is that "xargs" tries to execute "badexec-name" for every command line argument from "1" to "6". Total of six execution tries. Similar to the following concept: $ echo 1 2 3 4 5 6 | xargs -n 1 rm rm: cannot remove `1': No such file or directory rm: cannot remove `2': No such file or directory rm: cannot remove `3': No such file or directory rm: cannot remove `4': No such file or directory rm: cannot remove `5': No such file or directory rm: cannot remove `6': No such file or directory Being unable to exec() a binary shouldn't be handled in a special way by stopping to process the incoming command-line arguments, and exiting prematurely. A call to exec() could fail for many reasons and some of them are non-permanent, meaning that the next call to exec() for the same command could be successful. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?38658> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/