[Toybox] watchdog: shutdown on SIGINT when in foreground

Rob Landley rob at landley.net
Thu Oct 15 17:15:49 PDT 2020


On 10/14/20 4:32 PM, Patrick Oppenlander wrote:
> Hi,
> 
> I was recently testing a watchdog driver and found it to be quite
> helpful to catch SIGINT when running "watchdog -F".
> 
> Trivial patch attached. Not sure if you want to catch both signals or
> switch like the patch does.

I'm not a heavy watchdog user so don't know, but I made it catch both. (I think
the cgroups stuff sends sigterm and the OOM killer sends sigkill, so this
wouldn't affect either anyway. And a bad lock or driver or the scheduler going
out to lunch due to some variant of swap thrashing isn't any of them. :)

Rob



More information about the Toybox mailing list