aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-07-07 23:20:48 +0800
committerDan Winship <danw@src.gnome.org>2001-07-07 23:20:48 +0800
commitc7fac300f31e086be19d0291d618130ef01c09b7 (patch)
treedc22fa0834d0510e29ec4a4d26e9c31f1f1cd32b /mail
parentf5c5e6e4a888ddbcd739c78848be1d9d523e41d8 (diff)
downloadgsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.tar.gz
gsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.tar.zst
gsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.zip
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
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/main.c17
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 <danw@ximian.com>
+
+ * 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 <clahey@ximian.com>
* 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);