diff options
author | russ <russ@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-15 21:57:44 +0000 |
---|---|---|
committer | russ <russ@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-15 21:57:44 +0000 |
commit | cd8b25e284a53379539bd0ef2419c3d0007cb34c (patch) | |
tree | d18739994a984c3d35edb73c936f015e0dbde631 /sysklogd | |
parent | 56e874c57638994a7ec56d08b41986f5c1a67f2d (diff) | |
download | busybox-w32-cd8b25e284a53379539bd0ef2419c3d0007cb34c.tar.gz busybox-w32-cd8b25e284a53379539bd0ef2419c3d0007cb34c.tar.bz2 busybox-w32-cd8b25e284a53379539bd0ef2419c3d0007cb34c.zip |
Get vfork_daemon_rexec working under uclinux
git-svn-id: svn://busybox.net/trunk/busybox@8087 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/klogd.c | 7 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 9 |
2 files changed, 9 insertions, 7 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 | ||
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 74b242c42..622500e48 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -681,11 +681,12 @@ extern int syslogd_main(int argc, char **argv) | |||
681 | umask(0); | 681 | umask(0); |
682 | 682 | ||
683 | if (doFork == TRUE) { | 683 | if (doFork == TRUE) { |
684 | if(daemon(0, 1) < 0) | ||
685 | bb_perror_msg_and_die("daemon"); | ||
686 | #if defined(__uClinux__) | 684 | #if defined(__uClinux__) |
687 | vfork_daemon_rexec(argc, argv, "-n"); | 685 | vfork_daemon_rexec(0, 1, argc, argv, "-n"); |
688 | #endif | 686 | #else /* __uClinux__ */ |
687 | if(daemon(0, 1) < 0) | ||
688 | bb_perror_msg_and_die("daemon"); | ||
689 | #endif /* __uClinux__ */ | ||
689 | } | 690 | } |
690 | doSyslogd(); | 691 | doSyslogd(); |
691 | 692 | ||