Hi,

While testing some java code that executes cyrus init script, I came into a
problem : the Java VM blocks SIGQUIT, event when using -Xrs parameter.

As SIGQUIT is safe shutdown, I need the signal delivered correctly. I came
up with the attached patch that resets the signal mask for cyrmaster before
setting the signal handlers.

diff --git a/master/master.c b/master/master.c
index 823be06..f2ca72e 100644
--- a/master/master.c
+++ b/master/master.c
@@ -1064,7 +1064,11 @@ void sigalrm_handler(int sig __attribute__((unused)))
 void sighandler_setup(void)
 {
     struct sigaction action;
-
+    sigset_t all_signals;
+
+    sigfillset(&all_signals);
+    sigprocmask(SIG_UNBLOCK, &all_signals, NULL);
+
     sigemptyset(&action.sa_mask);
     action.sa_flags = 0;



Any comment ? without it I can't restart Cyrus safely from java.

Regards,
Thomas.

Attachment: unblock_signals.diff
Description: Binary data

Reply via email to