[asterisk-dev] fork or pthread_atfork
Yuan Qin
yuan007qin at gmail.com
Fri Apr 6 08:40:09 MST 2007
Yes, you are right, it's my mistake:) the pthread_atfork only register some
clean handler.
On 4/6/07, Kevin P. Fleming <kpfleming at digium.com> wrote:
>
> Yuan Qin wrote:
>
> > The ast_log() will lock a mutex if appropriate, but the mutex may be in
> > locked state already.
> > Maybe we should use pthread_atfork() instead of fork() or never call
> > some functions that hold mutex
> > before execv() in child process.
>
> pthread_atfork() does not fork, it does something entirely different.
> Read the man page before suggesting we use it :-)
>
> However, you have raised a very valid point... we cannot use
> pthread-related functions for synchronization after forking, because we
> are not running in the same process any longer. I will have someone look
> into this, thanks for raising the issue!
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
--
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070406/55e2d42c/attachment.htm
More information about the asterisk-dev
mailing list