diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-11-01 16:40:12 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-11-01 16:40:12 +0000 |
commit | 4594bf69603a7197d50d44b180489f073171c3da (patch) | |
tree | bac63e14ee716a21046d7b51506f5eec7fc4b043 | |
parent | 3b183084f56576022a6d3d5231611bae041a4c36 (diff) |
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
-rw-r--r-- | avahi-daemon/chroot.c | 6 |
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(); |