Re: Check whether a dbus caller is still alive

Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Organization Geek Central
Message-ID <[email protected]>
I wrote:

> 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
> <https://dbus.freedesktop.org/doc/dbus-specification.html>.
> 
> 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.
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.