]> git.meshlink.io Git - catta/commitdiff
use a normal fork() instead of a daemon_fork() when forking of chroot() helper daemon
authorLennart Poettering <lennart@poettering.net>
Tue, 1 Nov 2005 16:40:12 +0000 (16:40 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 1 Nov 2005 16:40:12 +0000 (16:40 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@914 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/chroot.c

index 3cace267147f4d571ca7594f55c18bc8b30de94d..5478bce6ff332fc676c5c989429310e4f6686143 100644 (file)
@@ -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();