summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2017-02-07 07:26:17 +0100
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:23:13 +0100
commite71f25f7da636b241ba7bdf0fff2ddf9109b9a7f (patch)
tree1862c0746e3bb3f7c0035092bebdee885ec1f4aa /src/login
parentfac657c58ae86c747674391e477d9af043b29e2e (diff)
Uninstall the cgroup release agent when the manager is shut down.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind.c7
1 files changed, 7 insertions, 0 deletions
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);