daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
ff6046
From 9d0046ceca10911361137d6496987cb15ffff132 Mon Sep 17 00:00:00 2001
ff6046
From: Lukas Nykryn <lnykryn@redhat.com>
ff6046
Date: Thu, 25 Jun 2015 09:20:59 +0200
ff6046
Subject: [PATCH] Revert "core: one step back again, for nspawn we actually
ff6046
 can't wait for cgroups running empty since systemd will get exactly zero
ff6046
 notifications about it"
ff6046
ff6046
This reverts commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7.
ff6046
ff6046
RHEL-only
ff6046
https://bugzilla.redhat.com/show_bug.cgi?id=1141137
ff6046
https://github.com/systemd/systemd/pull/350
ff6046
ff6046
Resolves: #1703485
ff6046
---
ff6046
 src/core/unit.c | 11 +----------
ff6046
 1 file changed, 1 insertion(+), 10 deletions(-)
ff6046
ff6046
diff --git a/src/core/unit.c b/src/core/unit.c
ff6046
index cc43ddc4f1..d298afb0d4 100644
ff6046
--- a/src/core/unit.c
ff6046
+++ b/src/core/unit.c
ff6046
@@ -4579,16 +4579,7 @@ int unit_kill_context(
ff6046
 
ff6046
                 } else if (r > 0) {
ff6046
 
ff6046
-                        /* FIXME: For now, on the legacy hierarchy, we will not wait for the cgroup members to die if
ff6046
-                         * we are running in a container or if this is a delegation unit, simply because cgroup
ff6046
-                         * notification is unreliable in these cases. It doesn't work at all in containers, and outside
ff6046
-                         * of containers it can be confused easily by left-over directories in the cgroup — which
ff6046
-                         * however should not exist in non-delegated units. On the unified hierarchy that's different,
ff6046
-                         * there we get proper events. Hence rely on them. */
ff6046
-
ff6046
-                        if (cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER) > 0 ||
ff6046
-                            (detect_container() == 0 && !unit_cgroup_delegate(u)))
ff6046
-                                wait_for_exit = true;
ff6046
+                        wait_for_exit = true;
ff6046
 
ff6046
                         if (send_sighup) {
ff6046
                                 set_free(pid_set);