aboutsummaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-03-24 12:11:17 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-03-24 12:11:17 +0000
commit9067f13be067f39f6c8586926b190b7dee0def3d (patch)
treeff0a10f5f81fa0e1e719691c147309a9cc9bef46 /sysklogd
parent1b6fa4c57ced2ae89f51bdc073410c4be5384007 (diff)
downloadbusybox-9067f13be067f39f6c8586926b190b7dee0def3d.tar.gz
busybox-9067f13be067f39f6c8586926b190b7dee0def3d.tar.bz2
NOMMU re-exec trick shuld not depend on existence of "don't daemonize"
option for every affected applet (and dnsd, for example, don't have one). Thus rework re-exec support to not require it. Code got smaller too.
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/klogd.c3
-rw-r--r--sysklogd/syslogd.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index cca6f5671..fc0ed3037 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -51,7 +51,8 @@ int klogd_main(int argc, char **argv)
if (!(option_mask32 & OPT_FOREGROUND)) {
#ifdef BB_NOMMU
- vfork_daemon_rexec(0, 1, argc, argv, "-n");
+ if (!re_execed)
+ vfork_daemon_rexec(0, 1, argv);
#else
bb_daemonize();
#endif
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 2a2b20c8b..437212372 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -643,7 +643,8 @@ int syslogd_main(int argc, char **argv)
if (!(option_mask32 & OPT_nofork)) {
#ifdef BB_NOMMU
- vfork_daemon_rexec(0, 1, argc, argv, "-n");
+ if (!re_execed)
+ vfork_daemon_rexec(0, 1, argv);
#else
bb_daemonize();
#endif