[Toybox] [PATCH 1/2] xargs: fix kernel builds.
enh at google.com
Mon Oct 14 13:53:53 PDT 2019
It turns out that findutils xargs almost always uses an artificially low
limit of 128KiB. You can observe this with --show-limits (which I
refrained from adding to toybox since I believe it's only useful if
you're debugging a broken xargs).
I think an alternative fix for all this would be to go back to counting
the cost of the (char *)s, but separate the -s limit from the "system"
limit --- that way we could have the same behavior as findutils xargs
for explicit values of -s (which we all seem to agree should *not*
include the cost of the (char *)s), but also not accidentally overrun
the actual system limits when we do count the (char *)s. That's more
complicated though, and findutils' "128KiB is enough for anyone"
behavior is demonstrably "good enough", so let's go with that for now.
Tested by building an Android common kernel with toybox xargs, which
toys/posix/xargs.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2690 bytes
Desc: not available
More information about the Toybox