[uClibc]daemons terminating
Bjorn Andersson
bjorn at storsvangen.mine.nu
Tue Oct 29 19:37:35 UTC 2002
I'm having problems with the daemon-function on a 48 Mhz motorola 860.
It seems like parent process terminates before the child process has had
time
to become session leader. Am I the only one with this problem?
If a apply following patch everything works,
/Bjorn Andersson
--- uClibc-0.9.14/libc/unistd/daemon.c.orig Tue Oct 29 20:15:34 2002
+++ uClibc-0.9.14/libc/unistd/daemon.c Tue Oct 29 20:16:22 2002
@@ -42,6 +42,7 @@
case 0:
break;
default:
+ sleep(1); /* give child time to become session leader */
_exit(0);
}
More information about the uClibc
mailing list