<div dir="ltr">Thanks Ben,<div><br></div><div style>It all makes sense now.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 10, 2013 at 10:59 AM, Ben Pfaff <span dir="ltr">&lt;<a href="mailto:blp@nicira.com" target="_blank">blp@nicira.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Jun 06, 2013 at 05:34:26PM -0700, Alex Wang wrote:<br>
&gt; On Thu, Jun 6, 2013 at 4:27 PM, Ben Pfaff &lt;<a href="mailto:blp@nicira.com">blp@nicira.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; On Thu, Jun 06, 2013 at 09:49:11AM -0700, Alex Wang wrote:<br>
&gt; &gt; &gt; The 2/17. 3/17 look good to me.<br>
&gt; &gt;<br>
</div><div class="im">&gt; &gt; &gt; For this patch, want to ask few questions:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 1. why does the previous implementation cannot guarantee thread safety<br>
&gt; &gt; (An<br>
&gt; &gt; &gt; example?)? Is this related to the sigchld_ related functions?<br>
&gt; &gt;<br>
&gt; &gt; A single-threaded process can ensure that a signal handler doesn&#39;t<br>
&gt; &gt; run during a section of code by blocking and unblocking the signal<br>
&gt; &gt; around that section of code.  A multithreaded process can&#39;t do that,<br>
&gt; &gt; because the signal handler might get invoked from any thread.<br>
&gt;<br>
&gt; Seem to me that we make a rule here. We only want single threaded process<br>
&gt; to call &quot;process_init() and process_start()&quot;, right?<br>
<br>
</div>Yes, the later patch &quot;Add thread safety comments&quot; adds such comments.<br>
<div class="im">&gt;<br>
&gt; Also, I want to ask why do you remove the sigchld_ related functions? Is<br>
&gt; that because the &quot;xpthread_sigmask()&quot; is not thread safe?<br>
<br>
</div>I removed them because, after the patch, they were no longer used.<br>
</blockquote></div><br></div>