<div dir="ltr"><div><div><div>Hello,<br><br></div>Maybe not as technical as your solution, but on a Windows machine for an art installation, i did a quick "watchdog" that checked a "stillalive" file, that was regularly modified by the pd patch. So when/if pd crashed, the file wasn't updated anymore and the script would restart it. I think it was done in python...<br></div><br></div>cheers<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-03 11:56 GMT+02:00 Jack <span dir="ltr"><<a href="mailto:jack@rybn.org" target="_blank">jack@rybn.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you have several instances of Pd, it is also doable to do something<br>
like :<br>
<br>
pd -open yourpatch1.pd &<br>
PID1=$!<br>
pd -open yourpatch2.pd &<br>
PID2=$!<br>
<br>
while true<br>
do<br>
    if [ ! -d /proc/$PID1 ]<br>
    then<br>
        pd -open yourpatch1.pd &<br>
        PID1=$!<br>
    fi<br>
    if [ ! -d /proc/$PID2 ]<br>
    then<br>
        pd -open yourpatch2.pd &<br>
        PID2=$!<br>
    fi<br>
done<br>
<br>
<br>
++<br>
<span class="HOEnZb"><font color="#888888"><br>
Jack<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
Le 03/05/2018 à 11:46, Jack a écrit :<br>
> Hey list !<br>
> <br>
> Le 03/05/2018 à 09:42, Roman Haefeli a écrit :<br>
>> On Thu, 2018-05-03 at 06:29 +0200, michael strohmann wrote:<br>
>>> Hello, <br>
>>> i wonder if it is possible to setup something on raspberry, so that<br>
>>> the puredata-watchdog will restart pd-0.48.0 automatically?<br>
>>> where could i look up the mechanics of this, unfortunatly i am not a<br>
>>> unix crack…<br>
>><br>
>> Are you referring to the pd-watchdog binary, that comes with puredata-<br>
>> core? Is your Raspberry Pi running Raspbian?<br>
>><br>
>> From what I understand, the purpose of the pd-watchdog is to pause Pd<br>
>> in regular intervals when running in real-time mode. I think this is<br>
>> measure to prevent Pd from locking up the system. Assume you<br>
>> accidentally trigger an [until] without a stopping mechanism, thanks to<br>
>>  pd-watchdog you're still able to move the mouse and quit Pd.<br>
>><br>
>> Is your goal to make sure that Pd is running at any time, so that it is<br>
>> started again as soon as it stops?  Maybe you can achieve something<br>
>> like this wit a shell script. I haven't tested this, but it might give<br>
>> you an idea how to make it work:<br>
>><br>
>> ---<br>
>> #!/bin/sh<br>
>><br>
>> while true<br>
>> do <br>
>>   # We start pd and send detach it from the terminal ('&')<br>
>>   /usr/bin/pd -open yourpatch & <br>
>><br>
>>   # we catch pd's process id<br>
>>   pdpid=$!<br>
>><br>
>>   # now let's wait for the process to terminate<br>
>>   wait $pdpid<br>
>>   <br>
>>   # once pd terminates, we start another iteration<br>
>>   # of our while-loop<br>
>> done<br>
> <br>
> I will do something like :<br>
> <br>
> while true<br>
> do<br>
>     pd -open yourpatch # if pd crash the script continue to "sleep 1"<br>
> and a new loop start<br>
>     sleep 1<br>
> done<br>
> <br>
> ++<br>
> <br>
> Jack<br>
> <br>
> <br>
> <br>
>> ---<br>
>><br>
>> Roman<br>
>><br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
>> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
>><br>
> <br>
> <br>
> <br>
> <br>
> ______________________________<wbr>_________________<br>
> <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
> <br>
<br>
<br>
</div></div><br>______________________________<wbr>_________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Raphaël Ilias<br></div><div>  ___________________________________<br><b>     <a href="http://phae.fr" target="_blank">phae.fr</a></b><br></div>     17 places des Halles - Ingrandes</div><div>     49123 Ingrandes Le Fresne s/ Loire<br></div><div>     <a href="mailto:phae.ilias@gmail.com" target="_blank">phae.ilias@gmail.com</a> / +33 (0) 6 04 45 79 78<br>  ___________<br></div></div></div></div></div></div></div></div></div>
</div>