[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wait -n shouldn't collect multiple processes
From: |
Ben Elliston |
Subject: |
Re: wait -n shouldn't collect multiple processes |
Date: |
Mon, 25 Mar 2019 06:08:37 +1100 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
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
- wait -n shouldn't collect multiple processes, Ben Elliston, 2019/03/23
- Re: wait -n shouldn't collect multiple processes, Robert Elz, 2019/03/23
- Re: wait -n shouldn't collect multiple processes, Robert Elz, 2019/03/23
- Re: wait -n shouldn't collect multiple processes, Chet Ramey, 2019/03/25
- Re: wait -n shouldn't collect multiple processes, Ben Elliston, 2019/03/25
- Re: wait -n shouldn't collect multiple processes, Chet Ramey, 2019/03/25
- Re: wait -n shouldn't collect multiple processes, Ben Elliston, 2019/03/25
- Re: wait -n shouldn't collect multiple processes, Andreas Schwab, 2019/03/26
- Re: wait -n shouldn't collect multiple processes, Robert Elz, 2019/03/26
- Re: wait -n shouldn't collect multiple processes, Chet Ramey, 2019/03/26