From e71f25f7da636b241ba7bdf0fff2ddf9109b9a7f Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Tue, 7 Feb 2017 07:26:17 +0100 Subject: [PATCH] Uninstall the cgroup release agent when the manager is shut down. --- src/login/logind.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/login/logind.c b/src/login/logind.c index d60241342..5da76a767 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -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); -- 2.30.2