freebsd-ports/devel/gconf2/files/patch-gconf_gconftool.c
Jean-Yves Lefort 4b5f693904 Fix the long standing bug which caused newly installed GConf
applications to not pick up their default configuration values unless
gconfd-2 was manually restarted. Now:

  - gconftool-2 --makefile-{install|uninstall}-rule will send a SIGHUP
    to all the gconfd-2 processes.
  - upon receipt of that SIGHUP, gconfd-2 will reload the database and
    therefore pick up the added/removed schemas (note that the stock
    gconfd-2 already reloaded the database when receiving a SIGHUP, but
    only in the periodic cleanup which ran every 30 seconds; I've
    modified it to reload the database immediately so that applications
    can be started right after they have been installed).
2006-05-05 11:01:31 +00:00

28 lines
690 B
C

--- gconf/gconftool.c.orig Fri May 5 12:36:01 2006
+++ gconf/gconftool.c Fri May 5 12:39:29 2006
@@ -3724,6 +3724,8 @@
static int
do_makefile_install(GConfEngine* conf, const gchar** args, gboolean unload)
{
+ int sync_result;
+
if (args == NULL)
{
g_printerr (_("Must specify some schema files to install\n"));
@@ -3738,7 +3740,15 @@
++args;
}
- return do_sync (conf);
+ sync_result = do_sync (conf);
+
+ /*
+ * Send all the gconfd-2 processes a SIGHUP so that they reload the
+ * databases and pick up the added/removed schemas.
+ */
+ system("/usr/bin/killall -SIGHUP gconfd-2 >/dev/null 2>&1");
+
+ return sync_result;
}
typedef enum {