Prestart DBus services

Michael Rasmussen mir at datanom.net
Mon Aug 1 14:01:25 PDT 2011


Hi all,

In lastest releases of DBus your are able to instruct upstart to
prestart DBus services under boot, but what do you do when upstart is
not available? Can you instruct DBus to start the service synchronous?

Using upstart
[D-BUS Service]
Name=org.some.DbusService
Exec=/usr/bin/DbusService
User=foo
UpstartJob=true

The reason for my question is that I have a service which takes a few
seconds to populate some internal data structure and when a client
requests service for the first time the function is called before the
data structure is populated and therefore returns an empty list.

I could of course wait in the function for the list to populate but
what if this wait time is longer than the hardcoded timeout in DBus?

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110801/f6e96b35/attachment.pgp>


More information about the dbus mailing list