|
Re: daemons terminating: msg#00183lib.uclibc.general
On Tue Oct 29, 2002 at 08:37:35PM +0100, Bjorn Andersson wrote: > 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, That sounds pretty wierd. There should be no such race. <sound of Erik thinking> Can you try this patch and let me know if it helps? --- libc/unistd/daemon.c 11 Jan 2002 13:30:41 -0000 1.6 +++ libc/unistd/daemon.c 30 Oct 2002 08:27:53 -0000 @@ -48,6 +48,11 @@ if (setsid() == -1) return(-1); + /* Make certain we are not a session leader, or else we + * might reacquire a controlling terminal */ + if (fork()) + _exit(0); + if (!nochdir) chdir("/"); -Erik -- Erik B. Andersen http://codepoet-consulting.com/ --This message was written using 73% post-consumer electrons-- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | fileutils build: 00183, Patrick Mahoney |
|---|---|
| Next by Date: | Compilation failure of s_ceil.c on PowerPC: 00183, Simon Rowe |
| Previous by Thread: | daemons terminatingi: 00183, Bjorn Andersson |
| Next by Thread: | Re: daemons terminating: 00183, Bjorn Andersson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |