aboutsummaryrefslogtreecommitdiffstats
path: root/mail/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/main.c')
-rw-r--r--mail/main.c17
1 files changed, 10 insertions, 7 deletions
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);