[gconf] [gconfd] Remove (worse than) useless signal handlers for SEGV, FPE, etc
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gconf] [gconfd] Remove (worse than) useless signal handlers for SEGV, FPE, etc
- Date: Mon, 1 Feb 2010 18:06:11 +0000 (UTC)
commit 33c73a785c79ecef125a53af29581d09f9ab3733
Author: Colin Walters <walters verbum org>
Date: Mon Feb 1 13:02:11 2010 -0500
[gconfd] Remove (worse than) useless signal handlers for SEGV, FPE, etc
Modern operating systems like Fedora tend to include system-wide crash
handlers (like ABRT) which operate by processing unhandled crashes
(signals such as SIGSEGV). By catching SIGSEGV but actually doing
nothing with it, GConf is breaking these crash handlers.
Delete all of the handlers for signals like SIGFPE, SIGSEGV which can't
be treated as recoverable.
https://bugzilla.gnome.org/show_bug.cgi?id=608705
gconf/gconfd.c | 37 -------------------------------------
1 files changed, 0 insertions(+), 37 deletions(-)
---
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index fe5d18a..38a8423 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -119,8 +119,6 @@ static GConfDatabase* obtain_database (GSList *addresses,
static void drop_old_databases (void);
static gboolean no_databases_in_use (void);
-static void gconf_handle_segv (int signum);
-
/*
* Flag indicating that we are shutting down, so return errors
* on any attempted operation. We do this instead of unregistering with
@@ -431,22 +429,6 @@ signal_handler (int signo)
++in_fatal;
switch (signo) {
- /* Fast cleanup only */
- case SIGSEGV:
-#ifdef SIGBUS
- case SIGBUS:
-#endif
- case SIGILL:
- enter_shutdown ();
-#ifndef G_OS_WIN32
- if (g_getenv ("DISPLAY"))
- gconf_handle_segv (signo);
-#else
- gconf_handle_segv (signo);
-#endif
- abort ();
- break;
-
case SIGFPE:
#ifdef SIGPIPE
case SIGPIPE:
@@ -844,28 +826,16 @@ main(int argc, char** argv)
act.sa_mask = empty_mask;
act.sa_flags = 0;
sigaction (SIGTERM, &act, NULL);
- sigaction (SIGILL, &act, NULL);
- sigaction (SIGBUS, &act, NULL);
- sigaction (SIGFPE, &act, NULL);
sigaction (SIGHUP, &act, NULL);
- sigaction (SIGSEGV, &act, NULL);
- sigaction (SIGABRT, &act, NULL);
sigaction (SIGUSR1, &act, NULL);
act.sa_handler = SIG_IGN;
sigaction (SIGINT, &act, NULL);
#else
signal (SIGTERM, signal_handler);
- signal (SIGILL, signal_handler);
-#ifdef SIGBUS
- signal (SIGBUS, signal_handler);
-#endif
- signal (SIGFPE, signal_handler);
#ifdef SIGHUP
signal (SIGHUP, signal_handler);
#endif
- signal (SIGSEGV, signal_handler);
- signal (SIGABRT, signal_handler);
#ifdef SIGUSR1
signal (SIGUSR1, signal_handler);
#endif
@@ -2710,10 +2680,3 @@ client_count (void)
return g_hash_table_size (client_table);
}
-
-static void
-gconf_handle_segv (int signum)
-{
- return;
-}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]