diff options
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/klogd.c | 4 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index f537a4b..2e187b1 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -150,8 +150,8 @@ extern int klogd_main(int argc, char **argv) #if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) if (daemon(0, 1) < 0) bb_perror_msg_and_die("daemon"); -#else - bb_error_msg_and_die("daemon not supported"); +#if defined(__uClinux__) + vfork_daemon_rexec(argc, argv, "-n"); #endif } doKlogd(console_log_level); diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 6732411..c554536 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -632,11 +632,12 @@ extern int syslogd_main(int argc, char **argv) umask(0); -#if ! defined(__uClinux__) if ((doFork == TRUE) && (daemon(0, 1) < 0)) { bb_perror_msg_and_die("daemon"); - } +#if ! defined(__uClinux__) + vfork_daemon_rexec(argc, argv, "-n"); #endif + } doSyslogd(); return EXIT_SUCCESS; |