chiark / gitweb /
Uninstall the cgroup release agent when the manager is shut down.
authorSven Eden <yamakuzure@gmx.net>
Tue, 7 Feb 2017 06:26:17 +0000 (07:26 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:23:13 +0000 (10:23 +0100)
src/login/logind.c

index d60241342216549b5d8cc795a76db252a4f86e5b..5da76a76754ec76e6aeac89910766c9fa6b3e3aa 100644 (file)
@@ -36,6 +36,7 @@
 #include "label.h"
 #include "label.h"
 #include "cgroup.h"
+#include "virt.h"
 
 static void manager_free(Manager *m);
 
@@ -206,6 +207,12 @@ static void manager_free(Manager *m) {
         safe_close(m->reserve_vt_fd);
 #endif // 0
 
+        /* Avoid the creation of new processes forked by the
+         * kernel; at this point, we will not listen to the
+         * signals anyway */
+        if (detect_container(NULL) <= 0)
+                (void) cg_uninstall_release_agent(ELOGIND_CGROUP_CONTROLLER);
+
         manager_shutdown_cgroup(m, true);
 
         strv_free(m->kill_only_users);