NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/46021: xargs should keep still



The following reply was made to PR bin/46021; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/46021: xargs should keep still
Date: Sun, 22 Apr 2012 20:02:37 +0000

 On Tue, Feb 14, 2012 at 05:00:07PM +0000, jklowden%schemamania.org@localhost 
wrote:
  >  >          % find /usr/include | ./die
  >  >          Segmentation fault
  >  >          % find /usr/include | ./die | cat
  >  >          Segmentation fault
  >  >          % find /usr/include | xargs ./die 
  >  >          xargs: ./die terminated by SIGSEGV
  >  >          % find /usr/include | xargs ./die | cat
  >  >          xargs: ./die terminated by SIGSEGV
  >  >          % 
  >  >  
  >  >  xargs
  >  >  doesn't print the same message, but it's equivalent and printed in the
  >  >  same circumstances.
  >  
  >  No, definitely not.  xargs interpreted the signal and printed a message. 
  >  It swallowed the signal, preventing the shell from seeing it.
 
 So your objection is that what you'd like to see is:
 
        % find /usr/include | ./die
        Segmentation fault
        % find /usr/include | ./die | cat
        Segmentation fault
        % find /usr/include | xargs ./die 
        Segmentation fault
        % find /usr/include | xargs ./die | cat
        Segmentation fault
        % 
 
 ?
 
 But your patch would produce
 
        % find /usr/include | ./die
        Segmentation fault
        % find /usr/include | ./die | cat
        Segmentation fault
        % find /usr/include | xargs ./die 
        % find /usr/include | xargs ./die | cat
        % 
 
 and this really doesn't make much sense.
 
  > In the last example, xargs littered the terminal via standard
  > error, but cat returned normally (or would, if it ever got
  > started).
 
 And cat also returns normally in the second case, without xargs. I
 don't see what's different.
 
 I don't understand either what you're complaining about or what you're
 trying to accomplish.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index