From: Lennart Poettering Date: Tue, 1 Nov 2005 16:40:12 +0000 (+0000) Subject: use a normal fork() instead of a daemon_fork() when forking of chroot() helper daemon X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=4594bf69603a7197d50d44b180489f073171c3da;p=catta 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 --- 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();