ryantimwilson / rpms / systemd

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