parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: STOP/CONT parallel


From: Bruno Lucas
Subject: Re: STOP/CONT parallel
Date: Mon, 6 Oct 2014 17:21:32 +0200

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.

Cheers,
BL

######### a.sh ###############
#!/bin/bash

echo $$
(
    bash b.sh
) &

wait

####### b.sh #################
#!/bin/bash

echo $$
(
    bash c.sh
) &

wait

###### c.sh #################

#!/bin/bash

echo $$
(
     while $1
    do
        sleep 1
        echo $(date)
    done

) &

wait

### end c.sh ###############




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?


/Ole



--
:-)
Bruno Lucas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]