[PD] watchdog -> force restart
michael strohmann
itsnotfair9 at gmail.com
Mon Feb 18 11:46:03 CET 2019
thanks for the clarification!
i must have imagined that sigup kills pd…indeed the rest of the system does not freeze.
i am still looking for a way automatically restart pd or the computer if pd freezes…
> On 18 Feb 2019, at 10:54, IOhannes m zmoelnig <zmoelnig at iem.at> wrote:
>
> On 18.02.19 10:21, michael strohmann wrote:
>> i need help understanding this description of the pd-watchdog
>>
>>> s_watchdog.c is the source of pd-watchdog, which was spawned in sys_startgui().
>>> pd-watchdog monitors its stdin for any input, timing out after 5 seconds if nothing was received.
>>> In this case it kills pd with a SIGHUP, but normally it will continue looping as long as
>>> characters are received from pd' at a rate of at least one every 5 seconds. So if pdtk_watchdog
>>> calls pd every 2 seconds and glob_watchdog() sends a CR each time through the pipe, everything
>>> runs smoothly.
>
> which part of ths description gives you trouble to understand
> (yes, the description is pretty tech; but i don't know your personal
> background so it'hs hard to give an proper answer to *your* problem).
>
>> "pd-watchdog monitors its stdin for any input” does this also work if i start pd with -stderr >2/dev/null ?
>
> 'stdout' and 'stderr' are unrelated (well, they are related; but
> whatever you do with stderr does not have an effect on stdout).
> but anyhow: yes, this also works if you redirect your stderr.
>
>> is the fact that i run pd as superuser responsible for pd NOT beeing killed by SIGHUP ?
>
> ah well, Pd is not being "killed" by SIGHUP (btw, where did you get this
> from?).
> the watchdog sends a SIGHUP signal to Pd, and Pd *gracefully handles*
> this signal (by releasing the CPU; the idea of pd-watchdog is really to
> prevent a frozen *system*, in case a Pd with realtime-priorities goes
> havoc; the SIGHUP signal will give the *system* a chance to do their
> thing, whatever that is)
>
> gfasdr
> IOhannes
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
More information about the Pd-list
mailing list