<br><br><div class="gmail_quote">On Wed, Oct 12, 2011 at 3:48 PM, Henrique de Moraes Holschuh <span dir="ltr"><<a href="mailto:hmh@debian.org">hmh@debian.org</a>></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>
> On 11/10/11 16:57, Bron Gondwana wrote:<br>
> > On Tue, Oct 11, 2011 at 02:51:25AM +0200, Thomas Cataldo wrote:<br>
> >> While testing some java code that executes cyrus init script, I came into a<br>
> >> problem : the Java VM blocks SIGQUIT, event when using -Xrs parameter.<br>
<br>
</div>[...]<br>
<div class="im"><br>
> >> --- a/master/master.c<br>
> >> +++ b/master/master.c<br>
> >> @@ -1064,7 +1064,11 @@ void sigalrm_handler(int sig __attribute__((unused)))<br>
> >> void sighandler_setup(void)<br>
> >> {<br>
> >> struct sigaction action;<br>
> >> -<br>
> >> + sigset_t all_signals;<br>
> >> +<br>
> >> + sigfillset(&all_signals);<br>
> >> + sigprocmask(SIG_UNBLOCK, &all_signals, NULL);<br>
> >> +<br>
> >> sigemptyset(&action.sa_mask);<br>
> >> action.sa_flags = 0;<br>
<br>
</div>[...]<br>
<div class="im"><br>
> FWIW I don't see any point explicitly unblocking all the signals,<br>
> including ones other than the ones we're about to explicitly setup<br>
> handlers for, but that's probably harmless.<br>
<br>
</div>IMHO we're better off unblocking just what we'll handle, better safe than<br>
sorry. If we're not going to handle it and we don'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>
> Also, as a defensive programming measure it's probably a good idea to<br>
> memset() that struct sigaction to zero rather than explicitly initialise<br>
> 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'll adjust that tonight & 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>