summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-12 02:31:40 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-12 03:07:02 +0200
commitf6023656e10823dff9e4b9f70628b671b3f4ed96 (patch)
tree49a68942aea7e4349166c67ed07ee82d465e5871
parentb708e7cea941538bfd5e20ce0a723c19b7da7d1d (diff)
service: trim cgroups if services that are "active" but "exited"
-rw-r--r--src/service.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index f8b4ff6a24..47108503dd 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1179,6 +1179,11 @@ static void service_set_state(Service *s, ServiceState state) {
service_connection_unref(s);
}
+ /* For the inactive states unit_notify() will trim the cgroup,
+ * but for exit we have to do that ourselves... */
+ if (state == SERVICE_EXITED)
+ cgroup_bonding_trim_list(s->meta.cgroup_bondings, true);
+
if (old_state != state)
log_debug("%s changed %s -> %s", s->meta.id, service_state_to_string(old_state), service_state_to_string(state));