aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-10-22 19:48:15 -0500
committerRob Landley <rob@landley.net>2020-10-22 19:48:15 -0500
commit660e6a384d8c7b32a8486a0aeb31f75939a99b75 (patch)
tree7607378be349e3ac4a7df9099c9a0075520f16e1 /toys/other
parent0030729a09896602b55571afb8be7fa9b29b730c (diff)
downloadtoybox-660e6a384d8c7b32a8486a0aeb31f75939a99b75.tar.gz
Add nommu-able xvdaemon() and use it to remove some TOYBOX_FORK dependencies
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/watchdog.c3
1 files changed, 1 insertions, 2 deletions
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);