> ! signal(SIGALRM, SIG_DFL);
> }
> --- 88,92 ----
> void idle_done(struct mailbox *mailbox)
> {
> /* Remove the polling function */
> ! signal(SIGALRM, SIG_IGN);
In my case (Solaris 8, outlook client) the problem of dying imapds
isn't fixed yet. I think it dies in the second call to idle_poll()
(alarm timer). This might be related to ...
According to the signal(3C) man page on Solaris 8:
void (*signal (int sig, void (*disp)(int)))(int);
If signal() is
used, disp is the address of a signal handler, and sig is
not SIGILL, SIGTRAP, or SIGPWR, the system first sets the
signal's disposition to SIG_DFL before executing the signal
handler.
SIG_DFL remains after idle_poll() is first called by the alarm timer.
There should be at least two ways to fix the problem:
1) add the signal() call in idle_init() to idle_poll() also
idle_update(IDLE_MAILBOX|IDLE_ALERT);
+ signal(SIGALRM, idle_poll);
alarm(idle_period);
2) use sigset() instead of signal() in idle_init() (on Solaris (?, 7, 8))
Is this an appropriate fix? (either one is working for me ... I think,-)
Cheers, ws