mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-11 17:31:10 +07:00
cgroup: call root cgroup system instead of systemd-1
This commit is contained in:
parent
e3aa71c38c
commit
0baf24ddd5
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user