diff --git a/src/watchdog.c b/src/watchdog.c index 756013c0..e7f070e7 100644 --- a/src/watchdog.c +++ b/src/watchdog.c @@ -56,13 +56,13 @@ static int init(char *progname, char *devnode, int timeout) return fd; } -static int loop(int fd) +static int loop(int fd, int period) { int dummy = 0; while (running) { - do_sleep(1); ioctl(fd, WDIOC_KEEPALIVE, &dummy); + sleep(period); } if (handover) { @@ -87,7 +87,7 @@ int watchdog(char *progname) _exit(1); } - ret = loop(fd); + ret = loop(fd, WDT_TIMEOUT / 2); close(fd); _exit(ret); diff --git a/src/watchdog.h b/src/watchdog.h index 3baaca5c..61bf932b 100644 --- a/src/watchdog.h +++ b/src/watchdog.h @@ -24,7 +24,7 @@ #include "config.h" /* Generated by configure script */ #define WDT_DEVNODE "/dev/watchdog" -#define WDT_TIMEOUT 3 +#define WDT_TIMEOUT 30 #ifdef BUILTIN_WATCHDOG int watchdog(char *progname);