X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fservice.c;h=bfbe959edbbc7f81a6ac64b0ea51e6b1678c0ff6;hb=b1491eba40715438b0ac874f2be79d5622b971e1;hp=53a2935e52d04bd4d6857def6c79e6278b82229b;hpb=dab5bf859900c0abdbf78c584e4aed42a19768cd;p=elogind.git diff --git a/src/core/service.c b/src/core/service.c index 53a2935e5..bfbe959ed 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -703,7 +703,7 @@ static void service_set_state(Service *s, ServiceState state) { /* For the inactive states unit_notify() will trim the cgroup, * but for exit we have to do that ourselves... */ if (state == SERVICE_EXITED && UNIT(s)->manager->n_reloading <= 0) - unit_destroy_cgroup(UNIT(s)); + unit_destroy_cgroup_if_empty(UNIT(s)); /* For remain_after_exit services, let's see if we can "release" the * hold on the console, since unit_notify() only does that in case of