diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-07-10 23:50:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-10 23:50:28 +0200 |
commit | 66713f77e851c12452729d37e22ef66673852b8f (patch) | |
tree | d6c513ec75da2d822cb5e74a1d68e03305a60d7b /src | |
parent | ac9ef33358b6e6277cfca86a85a49a022824549e (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c index efc5791bbc..0ba1d15033 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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); |