[systemd-commits] src/core

Lennart Poettering lennart at kemper.freedesktop.org
Tue Feb 4 17:23:36 PST 2014


 src/core/unit.c |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 1baccdda2e954214e0c5463d6ed8f06009b33c41
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 5 02:22:11 2014 +0100

    core: don't wait for non-control/non-main processes when killing processes on the host either
    
    Since the current kernel cgroup notification logic is easily confused by
    existing subgroups, let's do the same thing as in containers before. and
    just not wait for non-control and non-main processes.
    
    This should be corrected as soon as we have sane cgroup notifications
    from the kernel.

diff --git a/src/core/unit.c b/src/core/unit.c
index 78d7b53..63576a4 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2979,15 +2979,17 @@ int unit_kill_context(
                                 log_warning_unit(u->id, "Failed to kill control group: %s", strerror(-r));
                 } else if (r > 0) {
 
-                        /* FIXME: Now, this is a terrible hack: in
-                         * containers cgroup empty notifications don't
-                         * work. Hence we'll not wait for them to run
-                         * empty for now, since there is no way to
-                         * detect when a service ends with no main PID
-                         * known... */
-
-                        if (detect_container(NULL) <= 0)
-                                wait_for_exit = true;
+                        /* FIXME: Now, we don't actually wait for any
+                         * of the processes that are neither control
+                         * nor main process. We should wait for them
+                         * of course, but that's hard since the cgroup
+                         * notification logic is so unreliable. It is
+                         * not available at all in containers, and on
+                         * the host it gets confused by
+                         * subgroups. Hence, for now, let's not wait
+                         * for these processes -- but when the kernel
+                         * gets fixed we really should correct
+                         * that. */
 
                         if (c->send_sighup) {
                                 set_free(pid_set);



More information about the systemd-commits mailing list