imap4d: redo signal handling
Previously implemented way of signal handling was unsafe because of the use of unsafe functions in signal handlers. It also allowed for recursive invocations of MU calls not supposed to handle recursion (such as mu_mailbox_expunge, for example). This changeset fixes it. * imap4d/imap4d.c (imap4d_child_signal_setup): Change signal set. (imap4d_mainloop): Set a jump point for signal handling. Restore default handling for SIGILL, SIGBUS, SIGFPE, SIGSEGV, SIGSTOP. (master_jmp): New variable. (imap4d_master_signal): New function. (main): Redo signal handling. * imap4d/imap4d.h (child_jmp): New extern. (imap4d_enter_critical,imap4d_leave_critical): New protos. * imap4d/signal.c (imap4d_master_signal): Move to imap4d.c (imap4d_enter_critical,imap4d_leave_critical): New functions. (imap4d_child_signal): Rewrite. * imap4d/append.c: Protect critical sections. * imap4d/bye.c: Likewise. * imap4d/close.c: Likewise. * imap4d/copy.c: Likewise. * imap4d/delete.c: Likewise. * imap4d/expunge.c: Likewise. * imap4d/rename.c: Likewise. * imap4d/select.c: Likewise. * imap4d/status.c: Likewise. * scheme/Makefile.am (sievemod_DATA): Add guimb.scmi.
Showing
13 changed files
with
211 additions
and
129 deletions
-
Please register or sign in to post a comment