[Top][All Lists]

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

xargs and stdin

From: Andrew Pimlott
Subject: xargs and stdin
Date: Wed, 20 Jun 2001 11:12:21 -0400
User-agent: Mutt/1.3.15i

xargs runs the given command with the same stdin it receives.  This
is not robust because when it runs the command (eg, for the first
time), it may not have read stdin up to EOF, so if the command reads
stdin, the results are unpredictable.  You could argue that the
command shouldn't read stdin, but sometimes it happens, and I don't
think the user should be punished for this mistake.

Would you consider a change that reopened stdin to /dev/null on
every invocation of the command?

GNU xargs version 4.1.7


reply via email to

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