From 660e6a384d8c7b32a8486a0aeb31f75939a99b75 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 22 Oct 2020 19:48:15 -0500 Subject: Add nommu-able xvdaemon() and use it to remove some TOYBOX_FORK dependencies --- toys/other/watchdog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'toys/other') diff --git a/toys/other/watchdog.c b/toys/other/watchdog.c index a2e4fa01..232d82c0 100644 --- a/toys/other/watchdog.c +++ b/toys/other/watchdog.c @@ -9,7 +9,6 @@ USE_WATCHDOG(NEWTOY(watchdog, "<1>1Ft#=4<1T#=60<1", TOYFLAG_NEEDROOT|TOYFLAG_BIN config WATCHDOG bool "watchdog" default y - depends on TOYBOX_FORK help usage: watchdog [-F] [-t UPDATE] [-T DEADLINE] DEV @@ -38,7 +37,7 @@ void safe_shutdown(int ignored) { void watchdog_main(void) { - if (!FLAG(F) && daemon(1, 1)) perror_exit("failed to daemonize"); + if (!FLAG(F)) xvdaemon(); xsignal(SIGTERM, safe_shutdown); xsignal(SIGINT, safe_shutdown); xioctl(TT.fd = xopen(*toys.optargs, O_WRONLY), WDIOC_SETTIMEOUT, &TT.T); -- cgit v1.2.3