diff options
author | Brian Cameron <brian.cameron@sun.com> | 2007-11-08 18:49:18 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2007-11-08 18:49:18 +0000 |
commit | 3df5b435048997721919347a75f8799b9108eb44 (patch) | |
tree | 24c58c75cba36c7ecdbdd9cea5f3182138aae37d | |
parent | 3fe8cd521943c888bba0f4e86f8c0fb7b0fdf57f (diff) | |
download | gconf-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-- | ChangeLog | 8 | ||||
-rw-r--r-- | gconf/gconfd.c | 18 |
2 files changed, 12 insertions, 14 deletions
@@ -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; |