On Sun, Mar 24, 2019 at 11:29:41AM -0400, Chet Ramey wrote: > > My goal is to run a small process pool where upon one process > > completes, another one is started immediately. If I start (say) 10 > > processes and then wait on the first, I may have chosen the longest > > running process. > > OK. This sounds like a candidate for a SIGCHLD trap. You're not interested > in a particular process's exit status, so you can keep a count of running > processes and start new ones out of a trap handler.
Ah, but I *am* interested in exit status. Imagine trying to implement something akin to 'make -j' in bash. Make will stop if any of the child processes fail. Cheers, Ben
signature.asc
Description: PGP signature