You should not do _anything_ with threads in a vfork child.
pthread_self() is not safe.  Thread-local variables are not safe to
acccess.
Hmm, I suppose, in a non-MMU system, any user process is started by the shell using vfork(), So obvious there are situations where you are allowed to do threads in a vfork child. If you claim you need to do precautions do allow for threads, you need to do this for any program you start (doing vfork(); exec();) as you can't know if this program does threads.

Of course if you use vfork and don't do *exec(), you need to be very careful, but in fact I don't see when I should do this. To create threads I suppose I'd better use the pthread library instead of doing vfork() (or fork() or clone() ) in the user code.

-Michael


_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to