diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-07-28 07:40:39 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-07-28 07:40:39 +0000 |
commit | 35e643b39f6cc77b702c714cfa8e70f1e10601a9 (patch) | |
tree | ad6b608081a4dde117563a1f1e9a6e3892a8752c /sysklogd | |
parent | 4f4631732cab5886105d8809d4e9b17711def65b (diff) | |
download | busybox-w32-35e643b39f6cc77b702c714cfa8e70f1e10601a9.tar.gz busybox-w32-35e643b39f6cc77b702c714cfa8e70f1e10601a9.tar.bz2 busybox-w32-35e643b39f6cc77b702c714cfa8e70f1e10601a9.zip |
last_patch95 from vodz:
Hi.
Last patch have new libbb function
vfork_rexec() for can use daemon() to uClinux system.
This patched daemons: syslog, klogd, inetd, crond.
This not tested! I havn`t this systems.
Also. Previous patch for feature request MD5 crypt password for
httpd don`t sended to this mailist on 07/15/03
(mailist have Pytom module problem?).
The previous patch included, and have testing.
--w
vodz
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 f537a4bb8..2e187b199 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c | |||
@@ -150,8 +150,8 @@ extern int klogd_main(int argc, char **argv) | |||
150 | #if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) | 150 | #if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) |
151 | if (daemon(0, 1) < 0) | 151 | if (daemon(0, 1) < 0) |
152 | bb_perror_msg_and_die("daemon"); | 152 | bb_perror_msg_and_die("daemon"); |
153 | #else | 153 | #if defined(__uClinux__) |
154 | bb_error_msg_and_die("daemon not supported"); | 154 | vfork_daemon_rexec(argc, argv, "-n"); |
155 | #endif | 155 | #endif |
156 | } | 156 | } |
157 | doKlogd(console_log_level); | 157 | doKlogd(console_log_level); |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 67324116d..c554536c8 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -632,11 +632,12 @@ extern int syslogd_main(int argc, char **argv) | |||
632 | 632 | ||
633 | umask(0); | 633 | umask(0); |
634 | 634 | ||
635 | #if ! defined(__uClinux__) | ||
636 | if ((doFork == TRUE) && (daemon(0, 1) < 0)) { | 635 | if ((doFork == TRUE) && (daemon(0, 1) < 0)) { |
637 | bb_perror_msg_and_die("daemon"); | 636 | bb_perror_msg_and_die("daemon"); |
638 | } | 637 | #if ! defined(__uClinux__) |
638 | vfork_daemon_rexec(argc, argv, "-n"); | ||
639 | #endif | 639 | #endif |
640 | } | ||
640 | doSyslogd(); | 641 | doSyslogd(); |
641 | 642 | ||
642 | return EXIT_SUCCESS; | 643 | return EXIT_SUCCESS; |