diff options
author | Dan Winship <danw@src.gnome.org> | 2001-07-07 23:20:48 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-07-07 23:20:48 +0800 |
commit | c7fac300f31e086be19d0291d618130ef01c09b7 (patch) | |
tree | dc22fa0834d0510e29ec4a4d26e9c31f1f1cd32b /mail/main.c | |
parent | f5c5e6e4a888ddbcd739c78848be1d9d523e41d8 (diff) | |
download | gsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.tar gsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.tar.gz gsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.tar.bz2 gsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.tar.lz gsoc2013-evolution-c7fac300f31e086be19d0291d618130ef01c09b7.tar.xz 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/main.c')
-rw-r--r-- | mail/main.c | 17 |
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); |