From c7fac300f31e086be19d0291d618130ef01c09b7 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 7 Jul 2001 15:20:48 +0000 Subject: Only install the segv_redirect handler if SEGV's handler is not currently * main.c (main): Only install the segv_redirect handler if SEGV's handler is not currently SIG_DFL. Otherwise you get an infinite SEGV loop if you run with GNOME_DISABLE_CRASH_DIALOG. svn path=/trunk/; revision=10887 --- mail/ChangeLog | 6 ++++++ mail/main.c | 17 ++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 943c291fa9..8fae997593 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-07-07 Dan Winship + + * main.c (main): Only install the segv_redirect handler if SEGV's + handler is not currently SIG_DFL. Otherwise you get an infinite + SEGV loop if you run with GNOME_DISABLE_CRASH_DIALOG. + 2001-07-07 Christopher James Lahey * message-list.c (message_list_select): Made this handle being diff --git a/mail/main.c b/mail/main.c index 0656b44555..35cd26faca 100644 --- a/mail/main.c +++ b/mail/main.c @@ -94,13 +94,16 @@ main (int argc, char *argv []) gnome_init_with_popt_table ("evolution-mail-component", VERSION, argc, argv, oaf_popt_options, 0, NULL); - sa.sa_flags = 0; - sigemptyset (&sa.sa_mask); - sa.sa_handler = segv_redirect; - sigaction (SIGSEGV, &sa, &osa); - sigaction (SIGBUS, &sa, NULL); - sigaction (SIGFPE, &sa, NULL); - gnome_segv_handler = osa.sa_handler; + sigaction (SIGSEGV, NULL, &osa); + if (osa.sa_handler != SIG_DFL) { + sa.sa_flags = 0; + sigemptyset (&sa.sa_mask); + sa.sa_handler = segv_redirect; + sigaction (SIGSEGV, &sa, NULL); + sigaction (SIGBUS, &sa, NULL); + sigaction (SIGFPE, &sa, NULL); + gnome_segv_handler = osa.sa_handler; + } orb = oaf_init (argc, argv); -- cgit v1.2.3