Skip to content

Commit

Permalink
service: trim cgroups if services that are "active" but "exited"
Browse files Browse the repository at this point in the history
  • Loading branch information
poettering committed Jul 12, 2010
1 parent b708e7c commit f602365
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/service.c
Expand Up @@ -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));

Expand Down

0 comments on commit f602365

Please sign in to comment.