<br><br><div class="gmail_quote">On Wed, Oct 12, 2011 at 3:48 PM, Henrique de Moraes Holschuh <span dir="ltr">&lt;<a href="mailto:hmh@debian.org">hmh@debian.org</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 Tue, 11 Oct 2011, Greg Banks wrote:<br>
&gt; On 11/10/11 16:57, Bron Gondwana wrote:<br>
&gt; &gt; On Tue, Oct 11, 2011 at 02:51:25AM +0200, Thomas Cataldo wrote:<br>
&gt; &gt;&gt; While testing some java code that executes cyrus init script, I came into a<br>
&gt; &gt;&gt; problem : the Java VM blocks SIGQUIT, event when using -Xrs parameter.<br>
<br>
</div>[...]<br>
<div class="im"><br>
&gt; &gt;&gt; --- a/master/master.c<br>
&gt; &gt;&gt; +++ b/master/master.c<br>
&gt; &gt;&gt; @@ -1064,7 +1064,11 @@ void sigalrm_handler(int sig __attribute__((unused)))<br>
&gt; &gt;&gt;  void sighandler_setup(void)<br>
&gt; &gt;&gt;  {<br>
&gt; &gt;&gt;      struct sigaction action;<br>
&gt; &gt;&gt; -<br>
&gt; &gt;&gt; +    sigset_t all_signals;<br>
&gt; &gt;&gt; +<br>
&gt; &gt;&gt; +    sigfillset(&amp;all_signals);<br>
&gt; &gt;&gt; +    sigprocmask(SIG_UNBLOCK, &amp;all_signals, NULL);<br>
&gt; &gt;&gt; +<br>
&gt; &gt;&gt;      sigemptyset(&amp;action.sa_mask);<br>
&gt; &gt;&gt;      action.sa_flags = 0;<br>
<br>
</div>[...]<br>
<div class="im"><br>
&gt; FWIW I don&#39;t see any point explicitly unblocking all the signals,<br>
&gt; including ones other than the ones we&#39;re about to explicitly setup<br>
&gt; handlers for, but that&#39;s probably harmless.<br>
<br>
</div>IMHO we&#39;re better off unblocking just what we&#39;ll handle, better safe than<br>
sorry.  If we&#39;re not going to handle it and we don&#39;t expect it, better to<br>
never unblock them.<br>
<br>
In fact, if there are signals we _want_ blocked, it is best to explicitly do<br>
just that as well.<br>
<div class="im"><br>
&gt; Also, as a defensive programming measure it&#39;s probably a good idea to<br>
&gt; memset() that struct sigaction to zero rather than explicitly initialise<br>
&gt; some of its members.<br>
<br>
</div>Agreed.<br>
<br>
Thomas, could you respin the patch to only unblock the interesting<br>
signals, and zero-fill struct sigaction?<br></blockquote><div><br></div><div>Ok I&#39;ll adjust that tonight &amp; resubmit a version that only unblocks the signals cyrmaster handles.</div><div><br></div><div>Thanks for your feedback.</div>
<div><br></div><div><br></div></div>