the cloexec logic of the watchdog was broken
[project/procd.git] / main.c
diff --git a/main.c b/main.c
index f97a9ea..49d85f4 100644 (file)
--- a/main.c
+++ b/main.c
@@ -14,6 +14,7 @@
 
 #include <sys/wait.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 
 #include <unistd.h>
 #include <getopt.h>
@@ -39,7 +40,7 @@ static int main_procd_init(int argc, char **argv)
        procd_signal_preinit();
        procd_early();
        debug_init();
-       watchdog_init();
+       watchdog_init(1);
        system("/sbin/kmodloader /etc/modules-boot.d/");
        uloop_init();
        hotplug("/etc/hotplug-preinit.json");
@@ -69,6 +70,7 @@ int main(int argc, char **argv)
        }
        uloop_init();
        procd_signal();
+       trigger_init();
        if (getpid() != 1)
                procd_connect_ubus();
        else