On 10/14/19 3:53 PM, enh via Toybox wrote: > 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).
The kernel guys' decision not to give us a way to query this is wrong, by the way. (I'm honestly tempted to whack-a-mole based on queried kernel version in portability.h at this point. It'd never work for macos and freebsd though...) > 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. Are you building this on a kernel that _does_ have the 128k limit? (Which was lifted in 2.6.22 which came out July 8, 2007?) Otherwise a near miss of 128k shouldn't cause a problem...? > Tested by building an Android common kernel with toybox xargs, which > failed before. Sigh, it built upstream -git. :P > Bug: http://b/140269206 What's the translation URL to see this externally again? (I need to add that to the FAQ.) (Sorry, my plane back to Austin leaves in two and a half hours, off to the airport. Probably just apply your stuff verbatim when I get home but I gotta go now.) Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net