Monitoring lifetimes with Python bindings
hp at redhat.com
Thu Jul 7 01:07:07 EST 2005
On Wed, 2005-07-06 at 16:42 +0200, Ole Laursen wrote:
> This requires that the server can monitor the lifetime of a connecting
> client. It is not immediately obvious how to do this with D-BUS, but I
> think I need to make the server notice the sender upon receiving a
> request from a client and then let it subscribe to NameOwnerChanged
> signals to discover if the client name has changed from ":1.blahblah"
> to "" (hm, but this leads to a race condition).
This is the intended approach (to avoid the race, you can call
GetNameOwner or Ping on the client name after you subscribe to
NameOwnerChanged - but good point, a lot of people will mess this up, I
wonder if the glib bindings have it right... the idea with the glib
bindings would be to make this easy by just letting you connect to
"destroy" on the proxy representing the client instead of worrying about
> Anyway, this does not appear to be possible with the Python bindings
> since there is no way to get to the message and thus the sender when
> receiving a remote call. @dbus.explicitly_pass_message in 0.34 only
> seems to work with signals.
This is related to Ross's post earlier, though he was talking about the
GLib bindings. It does indeed seem important to have access to the
More information about the dbus