Dbus Service Process Life Cycle

Havoc Pennington hp at redhat.com
Mon Jul 31 07:03:20 PDT 2006


keith preston wrote:
> I have been utilizing Dbus for a lot of new development lately, and I 
> was wondering how does Dbus manage the processes that it launchs as 
> services.
> 
> What happens to a service when....
> 
> The process that requested the DBus service ends?

dbus gives you the tools to handle the lifecycle, but does not do it for 
you. It will let any process on the bus monitor when another process 
exits. But you have to write the code to make the service exit when 
unused, or after a timeout, or whatever policy makes sense.

> The Dbus session daemon is stopped?

By default dbus apps will exit on disconnection, but you can change this 
with dbus_connection_set_exit_on_disconnect

Havoc



More information about the dbus mailing list