On 7/15/25 6:52 AM, Zachary Santer wrote:
On Mon, Jul 14, 2025 at 10:52 PM John Sidles <jasid...@gmail.com> wrote:

I was a pretty big part of that discussion, and this looks broken to
me. If 'wait -n' is passed a list of pids, it shouldn't also be
waiting for other background processes that weren't passed to it as
arguments. Is that what you're saying it's doing?

$ set -o posix
$ mapfile -t JOBS < <(jobs -rp);
$ printf '%s\n' "${!}"
256
$ sleep 10 & wait -f -n -p waited_for "${!}"
[1] 257
$ printf '%s\n' "${!}"
257
$ printf '%s\n' "${waited_for}"
256
[1]+  Done

Alright, that's definitely what's going on. Chet, this is a bug, man.

Yes, Zack. That's why I posted a patch for it.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to