summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-11-08 18:49:18 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-11-08 18:49:18 +0000
commit3df5b435048997721919347a75f8799b9108eb44 (patch)
tree24c58c75cba36c7ecdbdd9cea5f3182138aae37d
parent3fe8cd521943c888bba0f4e86f8c0fb7b0fdf57f (diff)
downloadgconf-3df5b435048997721919347a75f8799b9108eb44.tar.gz
Remove calls to gconf_log from signal_handler function since it is not
2007-11-08 Brian Cameron <brian.cameron@sun.com> * gconf/gconfd.c: Remove calls to gconf_log from signal_handler function since it is not safe to print debug messages in non-reentrant signal handler functions. This fixes problems we were seeing on Solaris where GConf would hang on exit. Reviewed by Havoc Pennington and Ray Strode. Refer to bug #466745. svn path=/trunk/; revision=2493
-rw-r--r--ChangeLog8
-rw-r--r--gconf/gconfd.c18
2 files changed, 12 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index d54835f2..93cc746a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-08 Brian Cameron <brian.cameron@sun.com>
+
+ * gconf/gconfd.c: Remove calls to gconf_log from signal_handler
+ function since it is not safe to print debug messages in
+ non-reentrant signal handler functions. This fixes problems we
+ were seeing on Solaris where GConf would hang on exit. Reviewed
+ by Havoc Pennington and Ray Strode. Refer to bug #466745.
+
2007-10-22 Owen Taylor <otaylor@redhat.com>
* gconf/Makefile.am (install-data-local): If there is an existing
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index 556d2364..7992f76b 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -409,6 +409,10 @@ gconf_server_load_sources(void)
}
}
+/*
+ * Signal handlers should not log debug messages as this code is non-reentrant.
+ * Please avoid calling gconf_log in this function.
+ */
static void
signal_handler (int signo)
{
@@ -429,15 +433,9 @@ signal_handler (int signo)
case SIGILL:
enter_shutdown ();
#ifndef G_OS_WIN32
- gconf_log (GCL_ERR,
- _("Received signal %d, dumping core. Please report a GConf bug."),
- signo);
if (g_getenv ("DISPLAY"))
gconf_handle_segv (signo);
#else
- gconf_log (GCL_ERR,
- _("Received signal %d. Please report a GConf bug."),
- signo);
gconf_handle_segv (signo);
#endif
abort ();
@@ -455,11 +453,6 @@ signal_handler (int signo)
/* let the fatal signals interrupt us */
--in_fatal;
- gconf_log (GCL_ERR,
- _("Received signal %d, shutting down abnormally. Please file a GConf bug report."),
- signo);
-
-
if (gconf_main_is_running ())
gconf_main_quit ();
@@ -471,9 +464,6 @@ signal_handler (int signo)
/* let the fatal signals interrupt us */
--in_fatal;
- gconf_log (GCL_INFO,
- _("Received signal %d, shutting down cleanly"), signo);
-
if (gconf_main_is_running ())
gconf_main_quit ();
break;