Children of fork() Cannot pthread_create()?
Jerry Richards
jerryr at tonecommander.com
Wed Jun 6 12:02:42 PDT 2007
Hello All,
I noticed a similar forum entry that you made that is very similar to the
problem I'm having, but I did not see any resolution to it. I am using
uClibc version 2.95.3 of the mips-linux-uclibc/bin/mipsel-uclibc-gcc.
I have a multi-process and multi-threaded application. If I call
pthread_create() in the context of a grandchild (via fork() invocations) of
the original application process, then pthread_create() hangs (never
returns).
If I call pthread_create() in the context of the original application
process, then everything works fine and I am able to register lines and make
calls.
This is the code that will hang in pthread_create() as described above:
pthread_t SipMonitorThread;
char Arg[20];
if (pthread_create(&SipMonitorThread, NULL, SipMonitorEntry, &Arg) != 0) {
printf("\npthread_create of SipMonitorThread FAILED\n\n");
assert(0);
return;
}
printf("\npthread_create of SipMonitorThread SUCCEEDED\n\n");
Does anyone know why?
Best Regards,
Jerry
More information about the uClibc
mailing list