3 @@ -180,13 +180,41 @@ err:
4 int fuse_daemonize(int foreground)
11 + /* uClibc daemon() has problems with pthread and friends */
12 + /* workaround from http://www.mail-archive.com/uclibc@uclibc.org/msg01073.html */
13 + /* res = daemon(0, 0); */
14 + switch (res = fork()) {
24 - perror("fuse: failed to daemonize program\n");
25 + perror("fuse: failed to fork()\n");
32 + perror("fuse: failed to setsid()\n");
37 + if (fd = open("/dev/null", O_RDWR, 0) != -1) {
38 + dup2(fd, STDIN_FILENO);
39 + dup2(fd, STDOUT_FILENO);
40 + dup2(fd, STDERR_FILENO);