chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b708e7c
)
service: trim cgroups if services that are "active" but "exited"
author
Lennart Poettering
<lennart@poettering.net>
Mon, 12 Jul 2010 00:31:40 +0000
(
02:31
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 12 Jul 2010 01:07:02 +0000
(
03:07
+0200)
src/service.c
patch
|
blob
|
history
diff --git
a/src/service.c
b/src/service.c
index f8b4ff6a246d5c9c5044d2be243513f81f8fa191..47108503ddf47ed65a69803b904fcb41f083595a 100644
(file)
--- 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));