aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-07-28 09:31:28 +0000
committerEric Andersen <andersen@codepoet.org>2003-07-28 09:31:28 +0000
commit68d4a85f129f029ff7c42a65ca723444384f7357 (patch)
tree01659700e2ca857431eb9ffaab9ec0655295b2b9
parentf3a02bbf41432488bae8e2a17a9a1f361e428b6b (diff)
downloadbusybox-w32-68d4a85f129f029ff7c42a65ca723444384f7357.tar.gz
busybox-w32-68d4a85f129f029ff7c42a65ca723444384f7357.tar.bz2
busybox-w32-68d4a85f129f029ff7c42a65ca723444384f7357.zip
Fixup bugs in last patch
-rw-r--r--miscutils/crond.c3
-rw-r--r--networking/inetd.c4
-rw-r--r--sysklogd/klogd.c1
3 files changed, 4 insertions, 4 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 198bc2d85..b13959368 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -203,8 +203,9 @@ crond_main(int ac, char **av)
203 if (!(opt & 4)) { 203 if (!(opt & 4)) {
204 if(daemon(1, 0) < 0) { 204 if(daemon(1, 0) < 0) {
205 bb_perror_msg_and_die("daemon"); 205 bb_perror_msg_and_die("daemon");
206 }
206#if defined(__uClinux__) 207#if defined(__uClinux__)
207 } else { 208 else {
208 /* reexec for vfork() do continue parent */ 209 /* reexec for vfork() do continue parent */
209 vfork_daemon_rexec(ac, av, "-f"); 210 vfork_daemon_rexec(ac, av, "-f");
210 } 211 }
diff --git a/networking/inetd.c b/networking/inetd.c
index af262c39c..4c46495a6 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -832,13 +832,13 @@ inetd_main(int argc, char *argv[])
832 832
833#if defined(__uClinux__) 833#if defined(__uClinux__)
834 opt = bb_getopt_ulflags(argc, argv, "q:f", &sq); 834 opt = bb_getopt_ulflags(argc, argv, "q:f", &sq);
835 if (!(opt & 4)) { 835 if (!(opt & 2)) {
836 daemon(0, 0); 836 daemon(0, 0);
837 /* reexec for vfork() do continue parent */ 837 /* reexec for vfork() do continue parent */
838 vfork_daemon_rexec(argc, argv, "-f"); 838 vfork_daemon_rexec(argc, argv, "-f");
839 } 839 }
840#else 840#else
841 opt = bb_getopt_ulflags(ac, av, "q:", &sq); 841 opt = bb_getopt_ulflags(argc, argv, "q:", &sq);
842 daemon(0, 0); 842 daemon(0, 0);
843#endif /* uClinux */ 843#endif /* uClinux */
844 844
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index 2e187b199..c132e065c 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -147,7 +147,6 @@ extern int klogd_main(int argc, char **argv)
147 } 147 }
148 148
149 if (doFork) { 149 if (doFork) {
150#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
151 if (daemon(0, 1) < 0) 150 if (daemon(0, 1) < 0)
152 bb_perror_msg_and_die("daemon"); 151 bb_perror_msg_and_die("daemon");
153#if defined(__uClinux__) 152#if defined(__uClinux__)