bugfindutils - Bugs: bug #38658, If the command exec() fails, xargs...

 
 

bug #38658: If the command exec() fails, xargs terminates prematurely

Submitted by:  Ivan Zahariev <famzah>
Submitted on:  Thu 04 Apr 2013 11:52:23 AM UTC  
 
Category: xargsSeverity: 3 - Normal
Item Group: Wrong resultStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.4.2Fixed Release: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 05 Nov 2013 09:29:16 AM UTC, comment #4:

xargs exits immediatly when you simulate exitcodes 124, 125, 126, 127. what for is that? in my opinion unsusable.

for backwards compatibility it should be new option to xargs that will make continue running if it is sense. a lot of commands returns 255. for example SVN client when repo is unavailable.

Grzegorz Szyszlo <znik>
Thu 04 Apr 2013 01:11:01 PM UTC, comment #3:

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xargs.html

Dmitry V. Levin <ldv>
Thu 04 Apr 2013 01:05:43 PM UTC, comment #2:

This info isn't present in the Ubuntu man page. All I see there regarding this matter is:

Is this an Ubuntu/Debian bug in the man page?

Please also provide a URL link to the official POSIX web page/document that you quoted.

Ivan Zahariev <famzah>
Thu 04 Apr 2013 12:31:56 PM UTC, comment #1:

POSIX states: "If a command line meeting the specified requirements cannot be assembled, the utility cannot be invoked, an invocation of the utility is terminated by a signal, or an invocation of the utility exits with exit status 255, the xargs utility shall write a diagnostic message and exit without processing any remaining input."

That is, the behavior you expect would violate the standard.

Dmitry V. Levin <ldv>
Thu 04 Apr 2013 11:52:23 AM UTC, original submission:

Here is an example:

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:

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.

Ivan Zahariev <famzah>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by znik (Posted a comment)
  • -unavailable- added by ldv (Posted a comment)
  • -unavailable- added by famzah (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup