[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: STOP/CONT parallel
From: |
Ole Tange |
Subject: |
Re: STOP/CONT parallel |
Date: |
Mon, 6 Oct 2014 17:30:50 +0200 |
On Mon, Oct 6, 2014 at 5:21 PM, Bruno Lucas <brunolucas@gmail.com> wrote:
> On Mon, Oct 6, 2014 at 3:56 PM, Ole Tange <ole@tange.dk> wrote:
>>
>> On Mon, Oct 6, 2014 at 12:14 PM, Bruno Lucas <brunolucas@gmail.com> wrote:
>> >> On Thu, Oct 2, 2014 at 2:32 PM, Ole Tange <ole@tange.dk> 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
- STOP/CONT parallel, Bruno Lucas, 2014/10/01
- Re: STOP/CONT parallel, Ole Tange, 2014/10/02
- Re: STOP/CONT parallel, Bruno Lucas, 2014/10/02
- Re: STOP/CONT parallel, Ole Tange, 2014/10/02
- Re: STOP/CONT parallel, Bruno Lucas, 2014/10/03
- Re: STOP/CONT parallel, Bruno Lucas, 2014/10/06
- Re: STOP/CONT parallel, Ole Tange, 2014/10/06
- Re: STOP/CONT parallel, Bruno Lucas, 2014/10/06
- Re: STOP/CONT parallel,
Ole Tange <=