aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/crond.c4
-rw-r--r--miscutils/watchdog.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index d237a677e..1ab0038e0 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -191,8 +191,8 @@ int crond_main(int ac, char **av)
if (!(opt & 4)) {
#ifdef BB_NOMMU
- /* reexec for vfork() do continue parent */
- vfork_daemon_rexec(1, 0, ac, av, "-f");
+ if (!re_execed)
+ vfork_daemon_rexec(1, 0, av);
#else
xdaemon(1, 0);
#endif
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index ed9026d9e..e3d77d17e 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -38,12 +38,14 @@ int watchdog_main(int argc, char **argv)
if (optind < argc - 1 || argc == 1)
bb_show_usage();
+ if (!(opts & OPT_FOREGROUND)) {
#ifdef BB_NOMMU
- if (!(opts & OPT_FOREGROUND))
- vfork_daemon_rexec(0, 1, argc, argv, "-F");
+ if (!re_execed)
+ vfork_daemon_rexec(0, 1, argv);
#else
- xdaemon(0, 1);
+ xdaemon(0, 1);
#endif
+ }
signal(SIGHUP, watchdog_shutdown);
signal(SIGINT, watchdog_shutdown);