optional watchdog with auto-restart on hang (enabled if WatchdogSec is set in systemd unit)
re #338
Static analysis job will fail until this is rebased on top of #395.
The code is using libsystemd because the library is going to be present on any systemd-based distribution anyway. Otherwise, we're going have to handle things like:
If the $WATCHDOG_USEC environment variable is set, and the $WATCHDOG_PID variable is unset or set to the PID of the current process, the service manager expects notifications from this process.
If the usec parameter is non-NULL, sd_watchdog_enabled() will write the timeout in µs for the watchdog logic to it.
(which really means parsing data passed by systemd in environment variables)
If the first character of $NOTIFY_SOCKET is "@", the string is understood as Linux abstract namespace socket.
and so on.
There's also the RELOADING event, but I see no point in adding it since configuration reloading is nearly instantaneous.
WatchdogSec
is set in systemd unit)re #338
Static analysis job will fail until this is rebased on top of #395.
The code is using libsystemd because the library is going to be present on any systemd-based distribution anyway. Otherwise, we're going have to handle things like:
(which really means parsing data passed by systemd in environment variables)
and so on.
There's also the
RELOADING
event, but I see no point in adding it since configuration reloading is nearly instantaneous.