Check whether a dbus caller is still alive
ldo at geek-central.gen.nz
Mon Oct 2 06:11:43 UTC 2017
> You can get the sender unique name from the message. Then ask the
> D-Bus daemon itself for the process ID corresponding to this name,
> with the GetConnectionUnixProcessID method request
> You can do the latter just once per request, then save the process ID
> with your context for servicing that request and poll it periodically
> as I described.
But then again, this is precisely what the “Ping” method call is for.
So just send that periodically to the sender bus name, and if it ever
fails, then you know your client is gone.
More information about the dbus