mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +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
+1
-1
@@ -390,7 +390,7 @@ int main(int argc, char* argv[])
|
||||
/*
|
||||
* Start built-in watchdog as soon as possible, if enabled
|
||||
*/
|
||||
watchdog(argv[0]);
|
||||
wdogpid = watchdog(argv[0]);
|
||||
|
||||
/* Set hostname as soon as possible, for syslog et al. */
|
||||
set_hostname(&hostname);
|
||||
|
||||
Reference in new issue
Block a user