X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincd.c;h=1c9b6ed6d04535ad7d440b0e3aa6169f8d9f92d1;hb=e994222a4370621a9ac69c13ed23531c1eaa6809;hp=20d0e297108fba5e218fccf2127707da44605a0c;hpb=c5373d9fc0c8e3dfb6529b35bf44efe58410e0c7;p=tinc diff --git a/src/tincd.c b/src/tincd.c index 20d0e297..1c9b6ed6 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -56,6 +56,8 @@ #include "version.h" #include "random.h" #include "sandbox.h" +#include "watchdog.h" +#include "fs.h" /* If nonzero, display usage information and exit. */ static bool show_help = false; @@ -414,7 +416,9 @@ static bool drop_privs(void) { return false; } -#endif +#endif // HAVE_WINDOWS + + makedirs(DIR_CACHE | DIR_HOSTS | DIR_INVITATIONS); return sandbox_enter(); } @@ -694,8 +698,16 @@ int main2(int argc, char **argv) { try_outgoing_connections(); +#ifdef HAVE_WATCHDOG + watchdog_start(); +#endif + status = main_loop(); +#ifdef HAVE_WATCHDOG + watchdog_stop(); +#endif + /* Shutdown properly. */ end: