aboutsummaryrefslogtreecommitdiff
path: root/sysklogd/klogd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysklogd/klogd.c')
-rw-r--r--sysklogd/klogd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index c132e065c..df3a668dd 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -147,11 +147,12 @@ extern int klogd_main(int argc, char **argv)
147 } 147 }
148 148
149 if (doFork) { 149 if (doFork) {
150#if defined(__uClinux__)
151 vfork_daemon_rexec(0, 1, argc, argv, "-n");
152#else /* __uClinux__ */
150 if (daemon(0, 1) < 0) 153 if (daemon(0, 1) < 0)
151 bb_perror_msg_and_die("daemon"); 154 bb_perror_msg_and_die("daemon");
152#if defined(__uClinux__) 155#endif /* __uClinux__ */
153 vfork_daemon_rexec(argc, argv, "-n");
154#endif
155 } 156 }
156 doKlogd(console_log_level); 157 doKlogd(console_log_level);
157 158