From 68d4a85f129f029ff7c42a65ca723444384f7357 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 28 Jul 2003 09:31:28 +0000 Subject: [PATCH] Fixup bugs in last patch --- miscutils/crond.c | 3 ++- networking/inetd.c | 4 ++-- sysklogd/klogd.c | 1 - 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) if (!(opt & 4)) { if(daemon(1, 0) < 0) { bb_perror_msg_and_die("daemon"); + } #if defined(__uClinux__) - } else { + else { /* reexec for vfork() do continue parent */ vfork_daemon_rexec(ac, av, "-f"); } 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[]) #if defined(__uClinux__) opt = bb_getopt_ulflags(argc, argv, "q:f", &sq); - if (!(opt & 4)) { + if (!(opt & 2)) { daemon(0, 0); /* reexec for vfork() do continue parent */ vfork_daemon_rexec(argc, argv, "-f"); } #else - opt = bb_getopt_ulflags(ac, av, "q:", &sq); + opt = bb_getopt_ulflags(argc, argv, "q:", &sq); daemon(0, 0); #endif /* uClinux */ 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) } if (doFork) { -#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) if (daemon(0, 1) < 0) bb_perror_msg_and_die("daemon"); #if defined(__uClinux__) -- 2.25.1