[Toybox] [PATCH] xargs: add --process-slot-var.

enh enh at google.com
Fri Nov 14 09:28:05 PST 2025


ping? (ignore the first patch, but i think the second one's good;
certainly works for the coreutils user that motivated it.)

On Wed, Nov 5, 2025 at 2:47 PM enh <enh at google.com> wrote:
>
> okay, here's take two...
>
> [PATCH] xargs: add --process-slot-var.
>
> This also requires that we properly track child pids, so we can map
> between pids and slots.
> ---
>  tests/xargs.test   |  2 ++
>  toys/posix/xargs.c | 40 +++++++++++++++++++++++++++++-----------
>  2 files changed, 31 insertions(+), 11 deletions(-)
>
>
> On Wed, Nov 5, 2025 at 1:35 PM enh <enh at google.com> wrote:
> >
> > hmm... for this to be useful, i think we actually need to properly
> > track children rather than just increment/decrement TT.np. as it is,
> > this means the numbers are only meaningful until/unless we hit the
> > TT.P limit, at which point the waitchild() call inside the
> > input-parsing loop means we'll keep reusing the topmost values,
> > whether the corresponding processes have exited or not.
> >
> > On Wed, Nov 5, 2025 at 11:52 AM enh <enh at google.com> wrote:
> > >
> > > ---
> > >  tests/xargs.test   | 2 ++
> > >  toys/posix/xargs.c | 8 ++++++--
> > >  2 files changed, 8 insertions(+), 2 deletions(-)


More information about the Toybox mailing list