[Top][All Lists]

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

[bug #49466] xargs with 2>&1 returns error code in macOS 10.12

From: Bernhard Voelker
Subject: [bug #49466] xargs with 2>&1 returns error code in macOS 10.12
Date: Fri, 28 Oct 2016 14:16:08 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Follow-up Comment #1, bug #49466 (project findutils):

I don't see any reason for xargs to fail here; it doesn't even
see the "2>&1" redirection as the shell is evaluating this.
In effect, this should be identical to

  echo a | /usr/local/bin/xargs > /dev/null 2> /dev/null

So the reason could be a bug in your shell, or the file /dev/null
(which is usually a special character device to discard any input,
or still xargs.  You could run xargs under investigation of a tool
like 'strace' (which I don't know whether it is available on MacOS)
to see a bit more what happens:

  echo a | strace -o xargs.trace /usr/bin/xargs > /dev/null 2>&1 ; echo $?

The output in 'xargs.trace' would be quite interesting.

Thanks & have a nice day,


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]