[systemd-devel] dbus API for unit state change?

Brandon Philips brandon at ifup.co
Fri Oct 4 17:19:56 PDT 2013


Another dbus question:

Is it expected that a UnitNew and UnitRemove are sent when I use
org.freedesktop.DBus.Properties.Get or GetAll? This also happens with
`systemctl status doesnt-exist.service`

Here is an example of what I am seeing:
https://gist.github.com/philips/6834913/raw/5bd36998829ca44c25c3798afd3c77c147b1ba27/gistfile1.txt

This isn't very nice because I need to explicitly guard against
getting into an infinite loop of looking up properties on non-existent
units.

Thanks,

Brandon

On Thu, Oct 3, 2013 at 6:04 AM, Brandon Philips <brandon at ifup.co> wrote:
> On Thu, Oct 3, 2013 at 5:54 AM, Mantas Mikulėnas <grawity at gmail.com> wrote:
>> They do, but the state might have changed again between receiving
>> PropertiesChanged and retrieving the new value.
>
> This is OK for my current use case. I will program against
> PropertiesChanged and wait for Lennart's changes that include the
> changed property.
>
> Thanks,
>
> Brandon


More information about the systemd-devel mailing list