Revert "core: one step back again, for nspawn we actually can't wait for cgroups...
authorMartin Pitt <martin.pitt@ubuntu.com>
Mon, 27 Apr 2015 13:29:13 +0000 (15:29 +0200)
committerLuca Boccassi <bluca@debian.org>
Tue, 28 Feb 2023 11:15:45 +0000 (11:15 +0000)
This reverts commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7.

Bug-Debian: https://bugs.debian.org/784720
Bug-Ubuntu: https://launchpad.net/bugs/1448259
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1141137

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-one-step-back-again-for-nspawn-we-actual.patch

src/core/unit.c

index acbd582878fa7d0ff2bfd5e1ac05f54d980b9e93..dcb9ba6efff8f3cbbf8010b73ad5b0fd6bb3527c 100644 (file)
@@ -4627,16 +4627,7 @@ int unit_kill_context(
 
                 } else if (r > 0) {
 
-                        /* FIXME: For now, on the legacy hierarchy, we will not wait for the cgroup members to die if
-                         * we are running in a container or if this is a delegation unit, simply because cgroup
-                         * notification is unreliable in these cases. It doesn't work at all in containers, and outside
-                         * of containers it can be confused easily by left-over directories in the cgroup — which
-                         * however should not exist in non-delegated units. On the unified hierarchy that's different,
-                         * there we get proper events. Hence rely on them. */
-
-                        if (cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER) > 0 ||
-                            (detect_container() == 0 && !unit_cgroup_delegate(u)))
-                                wait_for_exit = true;
+                        wait_for_exit = true;
 
                         if (send_sighup) {
                                 set_free(pid_set);