mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-30 05:34:54 +02:00
Remove daemon(3) usage.
git-svn-id: file:///svn/unbound/trunk@1211 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -24,9 +24,6 @@
|
||||
/* Define to 1 if you have the `chroot' function. */
|
||||
#undef HAVE_CHROOT
|
||||
|
||||
/* Define to 1 if you have the `daemon' function. */
|
||||
#undef HAVE_DAEMON
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
|
||||
@@ -24666,8 +24666,7 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid daemon
|
||||
for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
|
||||
+1
-1
@@ -781,7 +781,7 @@ AC_CHECK_GETADDRINFO_WITH_INCLUDES
|
||||
if test $ac_cv_func_getaddrinfo = no; then
|
||||
AC_LIBOBJ([fake-rfc2553])
|
||||
fi
|
||||
AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid daemon])
|
||||
AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid])
|
||||
|
||||
# check mkdir
|
||||
AC_MSG_CHECKING([whether mkdir has one arg])
|
||||
|
||||
@@ -287,14 +287,6 @@ checkoldpid(struct config_file* cfg)
|
||||
static void
|
||||
detach(struct config_file* cfg)
|
||||
{
|
||||
#ifdef HAVE_DAEMON
|
||||
int err;
|
||||
if(daemon(1,0)!=0) {
|
||||
err=errno;
|
||||
unlink(cfg->pidfile);
|
||||
fatal_exit("daemon(3) failed: %s", strerror(err));
|
||||
}
|
||||
#else /* !HAVE_DAEMON */
|
||||
#ifdef HAVE_WORKING_FORK
|
||||
int fd, err;
|
||||
/* Take off... */
|
||||
@@ -324,7 +316,6 @@ detach(struct config_file* cfg)
|
||||
#else
|
||||
(void)cfg;
|
||||
#endif /* HAVE_WORKING_FORK */
|
||||
#endif /* HAVE_DAEMON */
|
||||
}
|
||||
|
||||
/** daemonize, drop user priviliges and chroot if needed */
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
27 August 2008: Wouter
|
||||
- daemon(3) is causing problems for people. Reverting the patch.
|
||||
bug#200, and 199 and 203 contain sideline discussion on it.
|
||||
|
||||
26 August 2008: Wouter
|
||||
- test for insecure zone when DLV is in use, also does negative cache.
|
||||
- test for trustanchor when DLV is in use (the anchor works).
|
||||
|
||||
Reference in New Issue
Block a user