From cde93897cdefdd7c7f66c400a61e42ceee5f6a46 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Dec 2013 18:14:52 +0100 Subject: event: hook up sd-event with the service watchdog logic Adds a new call sd_event_set_watchdog() that can be used to hook up the event loop with the watchdog supervision logic of systemd. If enabled and $WATCHDOG_USEC is set the event loop will ping the invoking systemd daemon right after coming back from epoll_wait() but not more often than $WATCHDOG_USEC/4. The epoll_wait() will sleep no longer than $WATCHDOG_USEC/4*3, to make sure the service manager is called in time. This means that setting WatchdogSec= in a .service file and calling sd_event_set_watchdog() in your daemon is enough to hook it up with the watchdog logic. --- Makefile.am | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 19da6eab95..9e4b1363ce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -652,10 +652,12 @@ test_rtnl_SOURCES = \ test_rtnl_LDADD = \ libsystemd-rtnl.la \ libsystemd-bus-internal.la \ + libsystemd-daemon-internal.la \ libsystemd-id128-internal.la \ libsystemd-shared.la -tests += test-rtnl +tests += \ + test-rtnl # ------------------------------------------------------------------------------ noinst_LTLIBRARIES += \ @@ -3966,10 +3968,12 @@ test_network_LDADD = \ libudev-internal.la \ libsystemd-bus-internal.la \ libsystemd-id128-internal.la \ + libsystemd-daemon-internal.la \ libsystemd-rtnl.la \ libsystemd-shared.la -tests += test-network +tests += \ + test-network EXTRA_DIST += \ src/network/networkd-gperf.gperf \ -- cgit v1.2.3-54-g00ecf