Compiling asterisk against uclibc-0.9.29
Rob Landley
rob at landley.net
Mon Oct 20 04:51:41 UTC 2008
On Sunday 19 October 2008 20:20:56 Ming-Ching Tiew wrote:
> After much debugging ( there goes my weekend ! ) as it turns
> out the problem I observed has nothing to do with 'thread'.
> I am not saying the 'thread' has no problem. I am yet to come
> to that part.
>
> The problem I observerd is confirmed due to daemon() function call.
>
> The daemon is a little function in the uclibc, if I don't do anything,
> after fork(), the parent will exit and it will cause the child to
> exit too. If I put a small sleep() in the parent before it calls _exit(),
> then the child could survive even after the parent exit.
Ok, it's sounding like a race condition in uClibc's current daemon()
implementation, triggered by the parent exiting before the child finishes
whatever it's doing in daemon().
However, it doesn't sound like the child process _dies_. Your original bug
report involved asterisk creating _lots_ of child processes, when it should
only create 3. I'm not sure what the failure behavior is, and would love to
be able to recreate it so I can debug it.
Do you have a small test case that's not part of the asterisk package but just
a program we can compile and run on our own systems?
Rob
More information about the uClibc
mailing list