race-free exit-on-idle (redux)

Colin Walters <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
Hi,

Regarding: https://bugs.freedesktop.org/show_bug.cgi?id=11454
(But posting here as I spend too much of my life waiting for
 Bugzilla instances - we can summarize there after, link to this thread)

We were talking about having a daemon for rpm-ostree in
https://github.com/projectatomic/rpm-ostree/pull/116

I would like to not have a persistent in memory daemon, for a variety
of reasons.

Now several systemd services do exit-on-idle.  I dug into how that's
supposed to work (mainly via `sd_notify("STOPPING=1")` ), and came up
with this example of a (hopefully) standalone race-free stateful service:

https://github.com/cgwalters/test-exit-on-idle

Now...is this actually race free?  There are a lot of subtleties involved
here, so I'd like to tap the collective brainpower here - was
 sd_notify(STOPPING=1) and the fact that systemd can track process
state and ensure there's only one, synchronized with the bus name
ownership the missing piece on top of the designs in https://bugs.freedesktop.org/show_bug.cgi?id=11454
?




_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.