X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain-afs-supervisor.c;h=6b79c9c1d41b6fe9562a4baf22fa7e1a8175459c;hb=5715fd569d6f8258830bb1808f9b65bde72cc5cd;hp=6daaf64912dc7f6aceaccc1c2b0476a121f45b6d;hpb=c31411aaba6c8bd04f68bfdb1f042d018e677790;p=src%2Fapp-framework-binder.git diff --git a/src/main-afs-supervisor.c b/src/main-afs-supervisor.c index 6daaf649..6b79c9c1 100644 --- a/src/main-afs-supervisor.c +++ b/src/main-afs-supervisor.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017, 2018 "IoT.bzh" + * Copyright (C) 2016-2019 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -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: