mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 19:21:53 +03:00
core: uninstall cgroup agent only if we are running outside of a container
Since the cgroupfs is currently not virtualized for containers we shouldn't reset the hosts agent from the container.
This commit is contained in:
parent
ac9ef33358
commit
66713f77e8
@ -1943,9 +1943,11 @@ finish:
|
||||
watchdog_close(true);
|
||||
}
|
||||
|
||||
/* avoid the creation of new processes forked by the kernel; at this
|
||||
* point, we will not listen to the signals anyway */
|
||||
cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER);
|
||||
/* Avoid the creation of new processes forked by the
|
||||
* kernel; at this point, we will not listen to the
|
||||
* signals anyway */
|
||||
if (detect_container(NULL) <= 0)
|
||||
cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER);
|
||||
|
||||
execve(SYSTEMD_SHUTDOWN_BINARY_PATH, (char **) command_line, env_block);
|
||||
free(env_block);
|
||||
|
Loading…
Reference in New Issue
Block a user