mirror of
https://github.com/troglobit/finit.git
synced 2026-11-10 16:31:21 +00:00
Refactor, simplify registration of built-in watchdog daemon
This patch not only greatly simplifies the registration of the built-in watchdog daemon, it also fixes a nasty race condition with an external watchdog daemon. The INIT_CMD_WDOG_HELLO could reach finit in reversed order, leading to the built-in daemon shutting down, but finit killing the just registered external daemon. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e0fb2b036d
commit
3c800f6508
3 files changed
+14
-49
No files matched your search
+2
-2
@@ -27,9 +27,9 @@
|
||||
#define WDT_TIMEOUT 3
|
||||
|
||||
#ifdef BUILTIN_WATCHDOG
|
||||
void watchdog(char *progname);
|
||||
int watchdog(char *progname);
|
||||
#else
|
||||
#define watchdog(progname)
|
||||
#define watchdog(progname) 0
|
||||
#endif /* BUILTIN_WATCHDOG */
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user