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:
e3aa71c
)
cgroup: call root cgroup system instead of systemd-1
author
Lennart Poettering
<lennart@poettering.net>
Mon, 15 Nov 2010 22:55:53 +0000
(23:55 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 15 Nov 2010 22:55:53 +0000
(23:55 +0100)
src/cgroup.c
patch
|
blob
|
history
diff --git
a/src/cgroup.c
b/src/cgroup.c
index 5130d3a89ff6097ae13af8c8fbf2fa633fa67e65..57c9c9e99e54fdaad02c44b7b819b6391a76ca1e 100644
(file)
--- a/
src/cgroup.c
+++ b/
src/cgroup.c
@@
-230,8
+230,12
@@
int manager_setup_cgroup(Manager *m) {
if ((r = cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, 0, ¤t)) < 0)
goto finish;
- snprintf(suffix, sizeof(suffix), "/systemd-%lu", (unsigned long) getpid());
- char_array_0(suffix);
+ if (m->running_as == MANAGER_SYSTEM)
+ strcpy(suffix, "/system");
+ else {
+ snprintf(suffix, sizeof(suffix), "/systemd-%lu", (unsigned long) getpid());
+ char_array_0(suffix);
+ }
free(m->cgroup_hierarchy);
if (endswith(current, suffix)) {