GNOME Bugzilla – Bug 671490
dbus: fix shutdown
Last modified: 2013-04-15 17:35:37 UTC
Somone recently pointed out to me gconftool-2 --shutdown doesn't work.
Created attachment 209109 [details] [review] dbus: fix shutdown gconftool-2 wasn't properly shutting down gconfd, because it was trying to do it before connecting to the daemon. This commit makes sure that we always first try to connect to the daemon before asking it to shutdown.
Review of attachment 209109 [details] [review]: Please commit.
Attachment 209109 [details] pushed as 3929961 - dbus: fix shutdown
This patch has the side-effect on causing warnings when running gconftool-2 --makefile-install-rule as root (as happens in packages still using GConf): # gconftool-2 --makefile-install-rule /etc/gconf/schemas/sound-juicer.schemas >/dev/null (gconftool-2:4139): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. This is caused by this bit of code in gconftool.c: if (makefile_install_mode || makefile_uninstall_mode) { /* [SNIP] */ /* shut down daemon, this is a race condition, but will usually work. */ gconf_shutdown_daemon (NULL); }
(In reply to comment #4) > > This is caused by this bit of code in gconftool.c: > > if (makefile_install_mode || makefile_uninstall_mode) > { > > /* [SNIP] */ > > /* shut down daemon, this is a race condition, but will usually work. */ > gconf_shutdown_daemon (NULL); > } I realized I could be a bit more verbose ;) With the changes from this patch, if the daemon is not running this causes a daemon ping to be sent, which does not work after doing a 'su' from a terminal started from a user gnome session (ie su -c "gconftool-2 -p" gives the same message)
After talking to Christophe on irc I pushed a fix here: https://git.gnome.org/browse/gconf/commit/?id=b0895e1998ebc83ab030ec0f17c0685439f5b404