Re: Why org.freedesktop.DBus.Local.Disconnected is called?

Thiago Macieira <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <4524404.C96k8zqvli@tjmaciei-mobl1>
On Sunday, 8 November 2020 08:16:37 PST Sheng Mao wrote:
> Thank you for explaining this, Thiago!
> 
> Then it means the unregistration code kwin_x11 will not be executed.
> Although I still don’t know who/why terminates the session but it is
> something I can use.

You can debug to find out the order in which events are happening. Does 
kwin_x11 exit before the dbus-daemon exits? Or does the daemon exit first, 
thus causing kwin_x11 to quit?

And is there sufficient time for dbus-daemon to notice other applications' 
exit and send service name deregistration signals? If all the processes are 
terminated too quickly, dbus-daemon may react to its termination before 
handling all the sockets.

> * in kwin_x11, I need to add a watcher for session disconnected, and close
> kwin_x11 event loop on that
> * in startkde, I need to add a timer to query registration status. My test
> app shows that the service becomes unregistered after a few seconds.
> QDBusServiceWatcher cannot send a unregistration event/signal if
> org.kde.KWin is terminated passively.
> 
> Thank you! I will do more tests on that.

You should simply react to the Disconnected signal and handle that as a 
deregistration of every single service name.

Note you can't send anything to D-Bus any more.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering



_______________________________________________
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.