After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583356 - Should not daemonize when autostarted by D-Bus
Should not daemonize when autostarted by D-Bus
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: Daemon
2.26.x
Other Linux
: Normal normal
: 2.26.0
Assigned To: Seahorse Maintainer
Seahorse Maintainer
: 585255 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-05-20 18:11 UTC by Josselin Mouette
Modified: 2009-06-09 19:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Quick fix (456 bytes, patch)
2009-05-20 18:12 UTC, Josselin Mouette
committed Details | Review

Description Josselin Mouette 2009-05-20 18:11:58 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
Comment 1 Josselin Mouette 2009-05-20 18:12:45 UTC
Created attachment 135042 [details] [review]
Quick fix

Since seahorse-daemon already has the correct flag, the fix is trivial.
Comment 2 Adam Schreiber 2009-05-20 19:05:59 UTC
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.
Comment 3 Adam Schreiber 2009-06-09 19:19:14 UTC
*** Bug 585255 has been marked as a duplicate of this bug. ***