mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-18 06:03:42 +03:00
main: don't mount cgroup controller unless PID == 1
This completes c1dae1b3c9729fb8ab749dd4e2dad07e0fad7ed8 in a way.
This commit is contained in:
parent
6c142648aa
commit
e2b1eb2661
@ -1582,7 +1582,7 @@ int main(int argc, char *argv[]) {
|
||||
if (getpid() == 1)
|
||||
install_crash_handler();
|
||||
|
||||
if (geteuid() == 0 && !getenv("SYSTEMD_SKIP_API_MOUNTS")) {
|
||||
if (getpid() == 1) {
|
||||
r = mount_cgroup_controllers(arg_join_controllers);
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
Loading…
x
Reference in New Issue
Block a user