Tracking application lifetime

Havoc Pennington hp at redhat.com
Thu Sep 14 07:06:21 PDT 2006



Sebastian Trüg wrote:
> Hello.
> 
> Is it possible to track the lifetime of a dbus client from another client? 
> What I want to do is removing a dbus client from an internal list once the 
> client crashes or terminates without manually unregistering.
> 

Yep, that's part of the purpose of dbus. What you want to do is watch 
for the client's unique bus name to lose its owner. The unique bus name 
will be in the "sender" field of any message you get from the client.

http://thaiopensource.org/development/suriyan/wiki/DbusNotes may be more 
helpful than the official tutorial if it isn't clear what I'm talking 
about with the bus name etc.

Surely someone on the list can point to a simple example of watching 
NameOwnerChanged on a unique bus name - anyone have that code around?

Havoc



More information about the dbus mailing list