diff options
author | Colin Walters <walters@verbum.org> | 2011-05-22 05:26:46 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-22 05:56:06 +0800 |
commit | f3c0b07212be3d3e5bcc7e1f9b904c675d488aab (patch) | |
tree | 8b2e5be3753520dcdf535866745f11ae6cbb0b3b /shell | |
parent | cb97c2dc8fd97b381af048f206333d5e557892ae (diff) | |
download | gsoc2013-evolution-f3c0b07212be3d3e5bcc7e1f9b904c675d488aab.tar gsoc2013-evolution-f3c0b07212be3d3e5bcc7e1f9b904c675d488aab.tar.gz gsoc2013-evolution-f3c0b07212be3d3e5bcc7e1f9b904c675d488aab.tar.bz2 gsoc2013-evolution-f3c0b07212be3d3e5bcc7e1f9b904c675d488aab.tar.lz gsoc2013-evolution-f3c0b07212be3d3e5bcc7e1f9b904c675d488aab.tar.xz gsoc2013-evolution-f3c0b07212be3d3e5bcc7e1f9b904c675d488aab.tar.zst gsoc2013-evolution-f3c0b07212be3d3e5bcc7e1f9b904c675d488aab.zip |
Bug 650525 - Don't install a SEGV handler
Assume the operating system ships with a system-wide crash catching
service like ABRT or Apport.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/main.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/shell/main.c b/shell/main.c index e6ba19a3e4..94064034fa 100644 --- a/shell/main.c +++ b/shell/main.c @@ -266,55 +266,6 @@ idle_cb (gchar **uris) #ifndef G_OS_WIN32 -/* SIGSEGV handling. - - The GNOME SEGV handler will lose if it's not run from the main Gtk - thread. So if we have to redirect the signal if the crash happens in another - thread. */ - -static void (*gnome_segv_handler) (gint); -static GStaticMutex segv_mutex = G_STATIC_MUTEX_INIT; -static GThread *main_thread = NULL; - -static void -segv_redirect (gint sig) -{ - gnome_segv_handler (sig); - - if (g_thread_self () != main_thread) { - /* We can't return from the signal handler or the thread may - SEGV again. But we can't g_thread_exit, because then the - thread may get cleaned up before bug-buddy can get a stack - trace. So we block by trying to lock a mutex we know is - already locked. */ - g_static_mutex_lock (&segv_mutex); - } -} - -static void -setup_segv_redirect (void) -{ - struct sigaction sa, osa; - - sigaction (SIGSEGV, NULL, &osa); - if (osa.sa_handler == SIG_DFL) - return; - - main_thread = g_thread_self (); - - 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); - - sa.sa_handler = SIG_IGN; - sigaction (SIGXFSZ, &sa, NULL); - gnome_segv_handler = osa.sa_handler; - g_static_mutex_lock (&segv_mutex); -} - static void quit_signal (gint sig) { @@ -344,7 +295,6 @@ setup_quit_signal (void) } #else -#define setup_segv_redirect() (void)0 #define setup_quit_signal() (void)0 #endif @@ -671,7 +621,6 @@ main (gint argc, gchar **argv) gconf_client_set_bool (client, key, FALSE, NULL); } - setup_segv_redirect (); setup_quit_signal (); if (evolution_debug_log) { |