[PD] watchdog -> force restart

IOhannes m zmoelnig zmoelnig at iem.at
Mon Feb 18 10:54:14 CET 2019


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190218/4c8ab515/attachment.sig>


More information about the Pd-list mailing list