Init script slowness

Thomas Cataldo tcataldo at gmail.com
Mon Oct 10 21:50:11 UTC 2011


Hi,

After more testing I confirmed that the Java VM that executes my cyrus init
script blocks the SIGQUIT signal.

The following patch ensures all signals are unblocked before trying to set
signal handlers. It fixes the problem in a clean way as it seems to be a
good practice to ensure signals are not blocked before setting 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;

Regards,
Thomas.

On Sun, Oct 9, 2011 at 7:39 PM, Thomas Cataldo <tcataldo at gmail.com> wrote:

> Hi,
>
> Thanks for all your infos. Your objections regarding my patch had me
> looking into how I run the script.
>
> I run the script from a Java VM. Understanding that you don't have the
> problem, I played with the "-Xrs" of the JVM that prevents it from
> interfering with sigquit... without any luck.
>
> Any idea how I can get a better insight at my problem ?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-cyrus-imapd-debian-devel/attachments/20111010/70400f9b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unblock_signals.diff
Type: application/octet-stream
Size: 441 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-cyrus-imapd-debian-devel/attachments/20111010/70400f9b/attachment.obj>


More information about the Pkg-Cyrus-imapd-Debian-devel mailing list