summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-05 23:04:51 +0200
committerLennart Poettering <lennart@poettering.net>2018-11-09 17:08:59 +0100
commite5c36295d81971ef75d9c6f98f0890b92a4a353f (patch)
treefda9a927c7ca5c08d35cc9bc241354b655c03c3d /src
parentc20076a8c170101fb9e6c77e4f7f84c5525dd7cc (diff)
downloadsystemd-e5c36295d81971ef75d9c6f98f0890b92a4a353f.tar.gz
systemd-e5c36295d81971ef75d9c6f98f0890b92a4a353f.tar.bz2
systemd-e5c36295d81971ef75d9c6f98f0890b92a4a353f.zip
unit: enqueue cgroup empty check event if the last ref on a unit is dropped
Diffstat (limited to 'src')
-rw-r--r--src/core/dbus-unit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 97bceb19dd..7ef9baf905 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -1781,7 +1781,13 @@ static int bus_unit_track_handler(sd_bus_track *t, void *userdata) {
u->bus_track = sd_bus_track_unref(u->bus_track); /* make sure we aren't called again */
+ /* If the client that tracks us disappeared, then there's reason to believe that the cgroup is empty now too,
+ * let's see */
+ unit_add_to_cgroup_empty_queue(u);
+
+ /* Also add the unit to the GC queue, after all if the client left it might be time to GC this unit */
unit_add_to_gc_queue(u);
+
return 0;
}