summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorWerner Fink <werner@suse.de>2015-06-10 14:36:50 +0200
committerLennart Poettering <lennart@poettering.net>2015-06-11 12:13:57 +0200
commitde1d4f9b5c6345f63edd46f643485eca909995bf (patch)
tree5a749ce3d2ec7165587422a98e117755cbfc3b96 /src/core/unit.c
parent64b8c0d030263fc37003f8655b53523231ec81d2 (diff)
core: Let two more booleans survive a daemon-reload
Without the boolean bus_name_good services as well as cgroup_realized for units a unit of Type=dbus and ExecReload sending SIGHUP to $MAINPID will be terminated if systemd will be daemon reloaded. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746151 https://bugs.freedesktop.org/show_bug.cgi?id=78311 https://bugzilla.opensuse.org/show_bug.cgi?id=934077
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index e380276d49..7bb2afc9f2 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2596,6 +2596,7 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) {
if (u->cgroup_path)
unit_serialize_item(u, f, "cgroup", u->cgroup_path);
+ unit_serialize_item(u, f, "cgroup-realized", yes_no(u->cgroup_realized));
if (serialize_jobs) {
if (u->job) {
@@ -2806,6 +2807,16 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
log_unit_debug_errno(u, r, "Failed to set cgroup path %s, ignoring: %m", v);
continue;
+ } else if (streq(l, "cgroup-realized")) {
+ int b;
+
+ b = parse_boolean(v);
+ if (b < 0)
+ log_unit_debug(u, "Failed to parse cgroup-realized bool %s, ignoring.", v);
+ else
+ u->cgroup_realized = b;
+
+ continue;
}
if (unit_can_serialize(u)) {