main: don't mount cgroup controller unless PID == 1

This completes c1dae1b3c9 in a way.
This commit is contained in:
Lennart Poettering
2013-03-22 04:43:27 +01:00
parent 6c142648aa
commit e2b1eb2661
+1 -1
View File
@@ -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;