summaryrefslogtreecommitdiff
path: root/state.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-07-14 11:56:32 +0200
committerJohn Crispin <blogic@openwrt.org>2013-07-14 11:56:32 +0200
commit36d79a90c28ac9d655ccd8261b3ac0b497a5aec1 (patch)
treef0f59d33a833809e3414dbc91f0d6050a593734c /state.c
parent434865f6f870f89571d7f2f5fa5690d16d6fb1d9 (diff)
downloadprocd-36d79a90c28ac9d655ccd8261b3ac0b497a5aec1.tar.gz
the cloexec logic of the watchdog was broken
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'state.c')
-rw-r--r--state.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/state.c b/state.c
index 71890a2..9cde905 100644
--- a/state.c
+++ b/state.c
@@ -40,15 +40,14 @@ static void state_enter(void)
switch (state) {
case STATE_EARLY:
LOG("- early -\n");
- watchdog_init();
+ watchdog_init(0);
hotplug("/etc/hotplug.json");
procd_coldplug();
break;
case STATE_INIT:
- // check if the wdt appeared during coldplug
- if (!watchdog_fd())
- watchdog_init();
+ // try to reopen incase the wdt was not available before coldplug
+ watchdog_init(0);
LOG("- init -\n");
log_init();
procd_connect_ubus();