Not always getting the "Disconnected" signal
Alberto Mardegan
alberto.mardegan at canonical.com
Fri Aug 16 02:31:32 PDT 2013
Hi all!
I've a D-Bus service which should exit when it gets disconnected from
the session bus. It does so in this way:
======
connection.connect(QString(),
QLatin1String("/org/freedesktop/DBus/Local"),
QLatin1String("org.freedesktop.DBus.Local"),
QLatin1String("Disconnected"),
this, SLOT(onDisconnected()));
======
and exiting in the onDisconnected() method. This works fine, normally:
if I kill the dbus-server running the session bus, I can see that the
onDisconnected() method is called and the service exits.
However, when the same service is started within a session created by
dbus-launch or dbus-test-runner (which I'm using for running the unit
tests), I can see that the dbus-server quits at the end of the unit
test, but my service's onDisconnected() method is not called, and the
service happily continues to live on as if nothing happened.
I wonder, is this behaviour somewhat configurable? I'm asking this
because for the unit tests I'm using a specific configuration file
(which I'm attaching). Maybe I'm missing some setting there?
If not, any idea of what could be going wrong?
TIA,
Alberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20130816/fcdda3b1/attachment.html>
More information about the dbus
mailing list