From 4594bf69603a7197d50d44b180489f073171c3da Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 1 Nov 2005 16:40:12 +0000 Subject: [PATCH] use a normal fork() instead of a daemon_fork() when forking of chroot() helper daemon git-svn-id: file:///home/lennart/svn/public/avahi/trunk@914 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/chroot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/avahi-daemon/chroot.c b/avahi-daemon/chroot.c index 3cace26..5478bce 100644 --- a/avahi-daemon/chroot.c +++ b/avahi-daemon/chroot.c @@ -298,12 +298,14 @@ int avahi_chroot_helper_start(const char *argv0) { return -1; } - if ((pid = daemon_fork()) < 0) { + if ((pid = fork()) < 0) { close(sock[0]); close(sock[1]); - avahi_log_error(__FILE__": Failed to fork()"); + avahi_log_error(__FILE__": fork() failed: %s", strerror(errno)); return -1; } else if (pid == 0) { + + setsid(); /* Drop all remaining capabilities */ avahi_caps_drop_all(); -- 2.39.5