diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-02-13 17:09:05 +0100 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2019-03-27 10:48:40 +0100 |
commit | 418ba126a955ee38804152c6c905ff200bbc1a92 (patch) | |
tree | 074fff556d86097a54e1d1eae38a27c0d1ab430f /src/main-afs-supervisor.c | |
parent | bf7fe722bcfc23dfc38d5adc765eadc3316b70a2 (diff) |
watchdog: Isolate the watchdog from jobs
Change-Id: Iaa7f71dc7e5d8d525463619b4da980c827722909
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/main-afs-supervisor.c')
-rw-r--r-- | src/main-afs-supervisor.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main-afs-supervisor.c b/src/main-afs-supervisor.c index b4250831..6b79c9c1 100644 --- a/src/main-afs-supervisor.c +++ b/src/main-afs-supervisor.c @@ -39,6 +39,7 @@ #include "verbose.h" #include "jobs.h" #include "process-name.h" +#include "watchdog.h" #if !defined(DEFAULT_SUPERVISOR_INTERFACE) # define DEFAULT_SUPERVISOR_INTERFACE NULL @@ -191,6 +192,14 @@ static void start(int signum, void *arg) /* ready */ sd_notify(1, "READY=1"); + + /* activate the watchdog */ +#if HAS_WATCHDOG + if (watchdog_activate() < 0) + ERROR("can't start the watchdog"); +#endif + + /* discover binders */ afs_supervisor_discover(); return; error: |