Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/ChangeLog,v
retrieving revision 1.390
diff -u -p -r1.390 ChangeLog
--- ChangeLog	17 Nov 2003 15:06:55 -0000	1.390
+++ ChangeLog	2 Dec 2003 16:45:54 -0000
@@ -0,0 +1,11 @@
+2003-12-02  Mark McLoughlin  <mark@skynet.ie>
+
+	Based on a patch from W. Michael Petullo <gnome@flyn.org>
+	in bug #97361.
+
+	* main.c:
+	(gsm_shutdown_gconfd): impl. shutting down gconfd.
+	(main): Shut down gconfd on logout.
+	
+	* Makefile.am: define GCONFTOOL_CMD.
+
Index: main.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/main.c,v
retrieving revision 1.60
diff -u -p -r1.60 main.c
--- main.c	13 Aug 2003 13:04:15 -0000	1.60
+++ main.c	2 Dec 2003 16:45:54 -0000
@@ -481,6 +481,33 @@ set_display_properties (void)
 #endif
 }
 
+static void
+gsm_shutdown_gconfd (void)
+{
+  GError *error;
+  char   *command;
+  int     status;
+
+  command = g_strjoin (" ", GCONFTOOL_CMD, "--shutdown", NULL);
+
+  status = 0;
+  error  = NULL;
+  if (!g_spawn_command_line_sync (command, NULL, NULL, &status, &error))
+    {
+      g_warning ("Failed to execute '%s' on logout: %s\n",
+		 command, error->message);
+      g_error_free (error);
+    }
+
+  if (status)
+    {
+      g_warning ("Running '%s' at logout returned an exit status of '%d'",
+		 command, status);
+    }
+
+  g_free (command);
+}
+
 int
 main (int argc, char *argv[])
 {
@@ -632,6 +659,8 @@ main (int argc, char *argv[])
 
   gsm_sound_logout ();
 
+  gsm_shutdown_gconfd ();
+
   clean_ice ();
 
   /* If a logout command was set, the following will not return */
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/Makefile.am,v
retrieving revision 1.102
diff -u -p -r1.102 Makefile.am
--- Makefile.am	11 Nov 2003 13:27:37 -0000	1.102
+++ Makefile.am	2 Dec 2003 16:45:54 -0000
@@ -13,6 +13,7 @@ INCLUDES =						\
 	-DREBOOT_COMMAND=\""$(REBOOT_COMMAND)\""	\
 	-DHALT_COMMAND=\""$(HALT_COMMAND)\""		\
 	-DRSH_COMMAND=\""$(RSH_COMMAND)\""		\
+	-DGCONFTOOL_CMD=\""$(GCONFTOOL)\""		\
 	-DDEFAULTDIR="\"$(defaultdir)\""		\
 	-DESD_SERVER="\"$(ESD_SERVER)\""
 
