summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/chroot.c
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-daemon/chroot.c')
-rw-r--r--avahi-daemon/chroot.c6
1 files 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();