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

2013-10-10 Thread Lennart Poettering
On Sun, 06.10.13 21:11, Brandon Philips (bran...@ifup.co) wrote: On Sun, Oct 6, 2013 at 3:10 PM, Lennart Poettering lenn...@poettering.net wrote: So, yeah, if you respond to each UnitNew signal you get with a property Get/GetAll call, then this will result in endless ping pong, which is

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

2013-10-06 Thread Lennart Poettering
On Fri, 04.10.13 17:19, Brandon Philips (bran...@ifup.co) wrote: 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` Yupp it kinda is. The

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

2013-10-06 Thread Brandon Philips
On Sun, Oct 6, 2013 at 3:10 PM, Lennart Poettering lenn...@poettering.net wrote: So, yeah, if you respond to each UnitNew signal you get with a property Get/GetAll call, then this will result in endless ping pong, which is certainly not a good idea. What are you trying to do? Write some tool

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

2013-10-04 Thread Brandon Philips
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:

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

2013-10-03 Thread Lennart Poettering
On Thu, 03.10.13 06:05, Mantas Mikulėnas (graw...@gmail.com) wrote: On Thu, Oct 3, 2013 at 5:27 AM, Brandon Philips bran...@ifup.co wrote: Hello- While writing against the dbus bindings I found one missing feature: signals from org.freedesktop.systemd1.Manager on unit ActiveState

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

2013-10-03 Thread Mantas Mikulėnas
On Thu, Oct 3, 2013 at 3:06 PM, Lennart Poettering lenn...@poettering.net wrote: On Thu, 03.10.13 06:05, Mantas Mikulėnas (graw...@gmail.com) wrote: This is already handled by the PropertiesChanged signal in the standard org.freedesktop.DBus.Properties interface. (Although systemd only sends

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

2013-10-03 Thread Brandon Philips
On Thu, Oct 3, 2013 at 5:54 AM, Mantas Mikulėnas graw...@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

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

2013-10-02 Thread Mantas Mikulėnas
On Thu, Oct 3, 2013 at 5:27 AM, Brandon Philips bran...@ifup.co wrote: Hello- While writing against the dbus bindings I found one missing feature: signals from org.freedesktop.systemd1.Manager on unit ActiveState changes. I can do this today by polling ListUnits but I would rather not have