[PD] watchdog
Jack
jack at rybn.org
Thu May 3 13:02:59 CEST 2018
Yes, it is good to add a "sleep 1" at the end of the while loop.
++
Jack
Le 03/05/2018 à 12:59, Roman Haefeli a écrit :
> On Thu, 2018-05-03 at 11:56 +0200, Jack wrote:
>> If you have several instances of Pd, it is also doable to do
>> something
>> like :
>>
>> pd -open yourpatch1.pd &
>> PID1=$!
>> pd -open yourpatch2.pd &
>> PID2=$!
>>
>> while true
>> do
>> if [ ! -d /proc/$PID1 ]
>> then
>> pd -open yourpatch1.pd &
>> PID1=$!
>> fi
>> if [ ! -d /proc/$PID2 ]
>> then
>> pd -open yourpatch2.pd &
>> PID2=$!
>> fi
>> done
>
> If I'm not mistaken, this hogs the CPU as it will run as many
> iterations per second as possible. I think a 'sleep 1' would already
> help.
>
> Roman
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180503/d406ec8a/attachment-0001.sig>
More information about the Pd-list
mailing list