Re: [PATCH v2] ash: fix wait -n behavior for multiple PIDs and pipe jobs

"Roberto A. Foglietta via busybox" <[email protected]> Tue, 31 Mar 2026 03:10:17 +0200
Newsgroups gmane.linux.busybox
Message-ID <CAJGKYO77pjO2tni5k8=VtFFvVfSmkPhG2Drb0K+hFdim=uAv4A@mail.gmail.com>
On Mon, 30 Mar 2026 at 01:50, Luiz Angelo Daros de Luca via busybox
<[email protected]> wrote:

>
> v1->v2:
> - Fixed wait -n state management: In the "wait without IDs" loop, the code now
>   uses continue instead of returning immediately after a process exits.
>   Returning immediately caused the job to never be marked as waited, leading to
>   subsequent wait -n calls incorrectly returning the same status. By continuing
>   the loop, the shell performs its standard job-scanning logic, which correctly
>   marks the job as waited and then returns the status.
> - Added wait8.tests and wait9.tests from Dominique patches.
> - Renamed existing tests for consistency (wait_n1 -> wait10, wait_n2 -> wait11)
> - Added wait12.tests specifically for wait -n $p1 $p2 (multiple positional
>   arguments)

Please, create a patch file (otherwise space and tab can mixup) on the
top of the HEAD of this branch:

- https://github.com/robang74/busybox/tree/bugfixes

and I am going to transfer your patch to that branch as well.
Contributions of others before your patch (especially when already
tested) are not going to be removed but integrated unless your patch
provides sensitive benefits like a relevant size reduction or
complexity.

Best regards, R-