chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a883394
)
cgroup: don't move systemd into systems.slice when running as --user instance
author
Lennart Poettering
<lennart@poettering.net>
Thu, 11 Jul 2013 16:37:14 +0000
(18:37 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 11 Jul 2013 16:49:52 +0000
(18:49 +0200)
src/core/cgroup.c
patch
|
blob
|
history
diff --git
a/src/core/cgroup.c
b/src/core/cgroup.c
index b5d13478561831124abc69301c8094b2d373c1c4..b9ef00c6174d487d6ed4e1643cbb5e49f29aab66 100644
(file)
--- a/
src/core/cgroup.c
+++ b/
src/core/cgroup.c
@@
-638,8
+638,11
@@
int manager_setup_cgroup(Manager *m) {
}
/* 4. Realize the system slice and put us in there */
}
/* 4. Realize the system slice and put us in there */
- a = strappenda(m->cgroup_root, "/" SPECIAL_SYSTEM_SLICE);
- r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, a, 0);
+ if (m->running_as == SYSTEMD_SYSTEM) {
+ a = strappenda(m->cgroup_root, "/" SPECIAL_SYSTEM_SLICE);
+ r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, a, 0);
+ } else
+ r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, 0);
if (r < 0) {
log_error("Failed to create root cgroup hierarchy: %s", strerror(-r));
return r;
if (r < 0) {
log_error("Failed to create root cgroup hierarchy: %s", strerror(-r));
return r;