Yes,&nbsp; you are right, it&#39;s my mistake:) the pthread_atfork only register some<br>clean handler.<br><br><div><span class="gmail_quote">On 4/6/07, <b class="gmail_sendername">Kevin P. Fleming</b> &lt;<a href="mailto:kpfleming@digium.com">
kpfleming@digium.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yuan Qin wrote:<br><br>&gt; The ast_log() will lock a mutex if appropriate, but the mutex may be in
<br>&gt; locked state already.<br>&gt; Maybe we should use pthread_atfork() instead of fork() or never call<br>&gt; some functions that hold mutex<br>&gt; before execv() in child process.<br><br>pthread_atfork() does not fork, it does something entirely different.
<br>Read the man page before suggesting we use it :-)<br><br>However, you have raised a very valid point... we cannot use<br>pthread-related functions for synchronization after forking, because we<br>are not running in the same process any longer. I will have someone look
<br>into this, thanks for raising the issue!<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>
&nbsp;&nbsp;&nbsp;&nbsp;Regards