From 2c99851181a652358aa3ca58ef38c57e46ae02e4 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 12 Apr 2006 18:09:26 +0000 Subject: - patch from Denis Vlasenko to add and use bb_xdaemon() --- sysklogd/klogd.c | 3 +-- sysklogd/syslogd.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'sysklogd') diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index 51b01430e..6dc5457af 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -121,8 +121,7 @@ int klogd_main(int argc, char **argv) #if defined(__uClinux__) vfork_daemon_rexec(0, 1, argc, argv, "-n"); #else /* __uClinux__ */ - if (daemon(0, 1) < 0) - bb_perror_msg_and_die("daemon"); + bb_xdaemon(0, 1); #endif /* __uClinux__ */ } doKlogd(console_log_level); diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index b43c72d66..0fcbb48bc 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -673,8 +673,7 @@ int syslogd_main(int argc, char **argv) #if defined(__uClinux__) vfork_daemon_rexec(0, 1, argc, argv, "-n"); #else /* __uClinux__ */ - if(daemon(0, 1) < 0) - bb_perror_msg_and_die("daemon"); + bb_xdaemon(0, 1); #endif /* __uClinux__ */ } doSyslogd(); -- cgit v1.2.3