summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index de6fbfbd4..586d92fca 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -35,6 +35,7 @@
#include "formats-util.h"
#include "label.h"
#include "label.h"
+#include "cgroup.h"
static void manager_free(Manager *m);
@@ -46,6 +47,8 @@ static Manager *manager_new(void) {
if (!m)
return NULL;
+ m->pin_cgroupfs_fd = -1;
+
m->console_active_fd = -1;
m->reserve_vt_fd = -1;
@@ -77,6 +80,9 @@ static Manager *manager_new(void) {
m->user_units = hashmap_new(&string_hash_ops);
m->session_units = hashmap_new(&string_hash_ops);
+ m->running_as = MANAGER_SYSTEM;
+ m->test_run = false;
+
if (!m->devices || !m->seats || !m->sessions || !m->users || !m->inhibitors || !m->buttons || !m->user_units || !m->session_units)
goto fail;
@@ -84,6 +90,11 @@ static Manager *manager_new(void) {
if (!m->kill_exclude_users)
goto fail;
+ /* Make cgroups */
+ r = manager_setup_cgroup(m);
+ if (r < 0)
+ goto fail;
+
m->udev = udev_new();
if (!m->udev)
goto fail;
@@ -171,6 +182,8 @@ static void manager_free(Manager *m) {
safe_close(m->reserve_vt_fd);
+ manager_shutdown_cgroup(m, true);
+
strv_free(m->kill_only_users);
strv_free(m->kill_exclude_users);