summaryrefslogtreecommitdiff
path: root/src/core/org.freedesktop.systemd1.conf
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-15 18:12:01 +0200
committerLennart Poettering <lennart@poettering.net>2016-08-22 16:14:21 +0200
commit05a98afd3e0513de50c5949b7fa50ff0989d68bc (patch)
tree74ef3320a2f75dac4285843098b2b33e5e0c817c /src/core/org.freedesktop.systemd1.conf
parentecddb2b586d1b69e5538fb85262d2b9e6d253ac0 (diff)
core: add Ref()/Unref() bus calls for units
This adds two (privileged) bus calls Ref() and Unref() to the Unit interface. The two calls may be used by clients to pin a unit into memory, so that various runtime properties aren't flushed out by the automatic GC. This is necessary to permit clients to race-freely acquire runtime results (such as process exit status/code or accumulated CPU time) on successful service termination. Ref() and Unref() are fully recursive, hence act like the usual reference counting concept in C. Taking a reference is a privileged operation, as this allows pinning units into memory which consumes resources. Transient units may also gain a reference at the time of creation, via the new AddRef property (that is only defined for transient units at the time of creation).
Diffstat (limited to 'src/core/org.freedesktop.systemd1.conf')
-rw-r--r--src/core/org.freedesktop.systemd1.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/org.freedesktop.systemd1.conf b/src/core/org.freedesktop.systemd1.conf
index 14f6aec029..647e5f736c 100644
--- a/src/core/org.freedesktop.systemd1.conf
+++ b/src/core/org.freedesktop.systemd1.conf
@@ -184,6 +184,14 @@
<allow send_destination="org.freedesktop.systemd1"
send_interface="org.freedesktop.systemd1.Manager"
+ send_member="RefUnit"/>
+
+ <allow send_destination="org.freedesktop.systemd1"
+ send_interface="org.freedesktop.systemd1.Manager"
+ send_member="UnrefUnit"/>
+
+ <allow send_destination="org.freedesktop.systemd1"
+ send_interface="org.freedesktop.systemd1.Manager"
send_member="EnableUnitFiles"/>
<allow send_destination="org.freedesktop.systemd1"