summaryrefslogtreecommitdiffhomepage
path: root/sysklogd
diff options
context:
space:
mode:
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/klogd.c7
-rw-r--r--sysklogd/syslogd.c7
2 files changed, 2 insertions, 12 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index fc0ed3037..62425394c 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -50,12 +50,7 @@ int klogd_main(int argc, char **argv)
}
if (!(option_mask32 & OPT_FOREGROUND)) {
-#ifdef BB_NOMMU
- if (!re_execed)
- vfork_daemon_rexec(0, 1, argv);
-#else
- bb_daemonize();
-#endif
+ bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv);
}
openlog("kernel", 0, LOG_KERN);
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 437212372..51627bd82 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -642,12 +642,7 @@ int syslogd_main(int argc, char **argv)
}
if (!(option_mask32 & OPT_nofork)) {
-#ifdef BB_NOMMU
- if (!re_execed)
- vfork_daemon_rexec(0, 1, argv);
-#else
- bb_daemonize();
-#endif
+ bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv);
}
umask(0);
do_syslogd();