~vcs-imports/busybox/trunk

Viewing all changes in revision 16499.

  • Committer: Denys Vlasenko
  • Author(s): Ron Yorston
  • Date: 2020-04-29 13:53:51 UTC
  • Revision ID: git-v1:1c462d47a0bc92f9f57af223456df53169acf3fe
xargs: restore correct behaviour of -n option

Since commit 1ff7002b1 (xargs: fix handling of quoted arguments, closes
11441) the -n option hasn't worked properly:

   $ echo 1 2 3 | xargs -n 1 echo
   1
   2

   3

   $

Because state is now remembered between calls to process_stdin() it's
necessary to update the state before any premature return.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: