From 3df5b435048997721919347a75f8799b9108eb44 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Thu, 8 Nov 2007 18:49:18 +0000 Subject: Remove calls to gconf_log from signal_handler function since it is not 2007-11-08 Brian Cameron * 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 --- ChangeLog | 8 ++++++++ gconf/gconfd.c | 18 ++++-------------- 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 + + * 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 * 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; -- cgit v1.2.1