[systemd-devel] [RFC] activate on DBus signal

Lennart Poettering lennart at poettering.net
Wed Apr 8 10:05:25 PDT 2015


On Mon, 23.03.15 17:54, WaLyong Cho (walyong.cho at samsung.com) wrote:

> Hi,
> 
> Now, I'm looking for a method to a service be activated on special DBus
> signal. If a process is running for waiting some of DBus signal this can
> be useful.
> 
> I already told with Simon in DBus mailing list.
> 
> see this thread:
> http://lists.freedesktop.org/archives/dbus/2015-March/016607.html
> 
> Simon said:
> "If it did, there are some nasty ordering constraints - I certainly
> wouldn't want to have to delay delivery of a broadcast until all
> interested services had started up! - so I don't think adding this
> feature would be a good idea."
> 
> How about also support for DBus signal?

Hmm, so this has come up before, but this is really nasty to support,
and I am not convinced we really want this.

First of all, in a kdbus world this would require kernel support, so
that the kernel will listen and queue messages on behalf of userspace,
and that would be quite a major change...

In general, so far activation was limited to *explicit* messages sent to
the service in question, services would never be activated as possibly
unintended side-effect of unrelated broadcast messages, and that's a
really good property...

> Then, make systemd to monitor DBus. And if a matched signal was sent,
> activate the service.

Well, it's not that simple, we'd also have to queue the signal, and
all following messages, and pass that on to the activated
service... And that's pretty nasty. It's already pretty nasty for the
current logic but it would be even more complex with a match logic...

I doubt this will fly...

Sorry,

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list