[systemd-devel] Can kdbus send signal to the source connection?
David Herrmann
dh.herrmann at gmail.com
Mon Jun 15 08:13:34 PDT 2015
Hi
On Mon, Jun 15, 2015 at 4:43 PM, Simon McVittie
<simon.mcvittie at collabora.co.uk> wrote:
> On 15/06/15 15:32, Lennart Poettering wrote:
>> Did I get this right, you have one bus connection per thread, but
>> possibly both a kdbus client and its service run from the server, and
>> you want broadcast msgs sent out from one to then also be matchable by
>> the other?
>
> If this is indeed what eshark means, then "talking to yourself" like
> this is something that always used to work with traditional D-Bus (as
> long as you make sure to never block waiting for a reply!), so it's a
> regression if it doesn't work with kdbus.
>
> In traditional D-Bus, broadcasts go to any connection that has
> registered its interest in the broadcast via AddMatch. dbus-daemon does
> not discriminate between the sender of a message, and other connections
> - in particular, it will send a copy of a broadcast back to its sender,
> if that's what the sender asked for.
>
> Various projects' regression tests work like this: they run the
> client-side and service-side code in the same GLib main loop and do
> everything asynchronously, and it works. Ideally, the only processes
> involved are the test and the dbus-daemon (and under kdbus the
> dbus-daemon would not be needed either).
Didn't know traditional DBus allows this. The kdbus fix should be as
simple as removing the condition in kdbus_bus_broadcast(). Dead-lock
detection for src==dst is already in place, as we allow unicasts to
oneself.
I'll look into this.
Thanks
David
More information about the systemd-devel
mailing list