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.
This commit is contained in:
Denis Vlasenko
2007-03-24 12:11:17 +00:00
parent 1b6fa4c57c
commit 9067f13be0
10 changed files with 34 additions and 30 deletions

View File

@@ -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

View File

@@ -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