GNOME Bugzilla – Bug 583356
Should not daemonize when autostarted by D-Bus
Last modified: 2009-06-09 19:19:14 UTC
When seahorse-daemon is not autostarted by the session, it is autostarted by D-Bus the first time it is called. In this case, the first D-Bus call always fails, while subsequent ones work. This can be reproduced easily with any of the clients in seahorse-plugins, which show this kind of error: ** (gedit:10626): WARNING **: dbus call to list keys failed: Launch helper exited with unknown return code 0 This is because seahorse-daemon, as the name says, daemonizes itself upon startup. Here are the comments of our D-Bus maintainer: <Np237> hmmmm this might be because seahorse-daemon daemonizes itself <Np237> I don’t know how daemons started by dbus are supposed to behave <sjoerd> Np237: they shouldn't daemonize themselves <sjoerd> Np237: if it first daemonizes itself and only then connects to the bus, the launch helper doesn't know wtf just happened <sjoerd> other then the thing it just launched did an exit(0) before it could actually call dbus methods on it <sjoerd> it would also explain prefectly why it works the second time <Np237> ok, so that’s clearly the explanation for seahorse-daemon <Np237> sjoerd: will D-Bus itself daemonize it correctly? <sjoerd> yeah
Created attachment 135042 [details] [review] Quick fix Since seahorse-daemon already has the correct flag, the fix is trivial.
Thanks for the patch. It's been committed to master and gnome-2-26, but unfortunately you missed my 2.26.2 release by a couple of hours. If there's a 2.26.3 it'll be in there.
*** Bug 585255 has been marked as a duplicate of this bug. ***