Re: [systemd-devel] dbus and exit-on-idle

2017-05-23 Thread Matthijs van Duin
On 22 May 2017 at 10:36, Lennart Poettering wrote: > Yes, the exit-on-idle logic on dbus is impossible to implement > correctly for non-trivial cases right now. > Hmm? Can you elaborate? Apart from the two issues I identified (which look easily fixable to me), are there more known races that wou

Re: [systemd-devel] dbus and exit-on-idle

2017-05-23 Thread Colin Walters
On Sun, May 21, 2017, at 08:26 PM, Matthijs van Duin wrote: > I've been pondering how to allow my bus-activated service to exit when > it's unneeded (which is 99% of the time), and in particular how to deal > with exit/activate races correctly... See also https://lists.freedesktop.org/archives/d

Re: [systemd-devel] dbus and exit-on-idle

2017-05-22 Thread Lennart Poettering
On Mon, 22.05.17 02:26, Matthijs van Duin (matthijsvand...@gmail.com) wrote: > I've been pondering how to allow my bus-activated service to exit when > it's unneeded (which is 99% of the time), and in particular how to deal > with exit/activate races correctly... > > In the systemd sources I stum

[systemd-devel] dbus and exit-on-idle

2017-05-21 Thread Matthijs van Duin
I've been pondering how to allow my bus-activated service to exit when it's unneeded (which is 99% of the time), and in particular how to deal with exit/activate races correctly... In the systemd sources I stumbled across the helper function bus_event_loop_with_idle() which does a clever trick by