Children of fork() Cannot pthread_create()?

Cédric Hombourger chombourger at nexwave-solutions.com
Wed Jun 6 12:57:15 PDT 2007


Hello Jerry,

Can you clarify which version of uclibc are you running as you wrote
2.95.3and it probably refers to the version of gcc (old though) more
than uclibc
(latest being 0.9.29).

I tried your sample program and it worked on mipsel. I then added a call to
fork(2)
as you described and it still worked.

Please let me know if I missed something.
Cedric

On 6/6/07, Jerry Richards <jerryr at tonecommander.com> wrote:
>
> 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
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/uclibc/attachments/20070606/fb36edcd/attachment.htm 


More information about the uClibc mailing list