On Mon, Oct 6, 2014 at 5:21 PM, Bruno Lucas <[email protected]> wrote: > On Mon, Oct 6, 2014 at 3:56 PM, Ole Tange <[email protected]> wrote: >> >> On Mon, Oct 6, 2014 at 12:14 PM, Bruno Lucas <[email protected]> wrote: >> >> On Thu, Oct 2, 2014 at 2:32 PM, Ole Tange <[email protected]> wrote: >> >>> >> >>> niceload is distributed with GNU Parallel, so you already have it >> >>> installed. >> >> >> > Niceload works fine, but just with the 'final' PID. When running bash >> > scripts within bash scripts, providing only the parent's PID dosen't >> > seem to >> > stop the 'final' worker that is actually using the CPU. >> >> Can you provide an example showing this, that I can run?
> Ok, I'll try to. > if you launch a.sh (see below) and then issue the command (from another > console) "kill -s SIGSTOP <pid_of_A>", then a.sh is stopped (shows T state), > but b.sh and c.sh continue to run. Ahh, but you donot want to just suspend A, you want to suspend A's process group: kill -TSTP -2986651 where 2986651 is A's PID. This will work as long as none of the children have started their own process group. In that case you probably need to -TSTP all the pids in the family. Look at the sub family_pids in the source for Parallel to see how that is done. /Ole
