OSDN Git Service

Fix xargs to obey POSIX's ARG_MAX restrictions.
authorElliott Hughes <enh@google.com>
Wed, 20 Sep 2017 20:53:23 +0000 (13:53 -0700)
committerRob Landley <rob@landley.net>
Sun, 1 Oct 2017 21:55:06 +0000 (16:55 -0500)
commitb89af5ed5c95ebe0466830d90eedd430593a3584
tree946632d0bceddb6209681b04480bc969d529589c
parentb542295cd8d906647e013056ab049323ce11e910
Fix xargs to obey POSIX's ARG_MAX restrictions.

This avoids "xargs: exec echo: Argument list too long" errors in practice.

find(1) needs to be fixed too, but that's a bit more complicated and a working
xargs provides a workaround.

Bug: http://b/65818597
Test: find /proc | strace -f -e execve ./toybox xargs echo > /dev/null
lib/lib.c
lib/lib.h
toys/posix/xargs.c