mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
cgroup: only install cgroup release agent when we own the root cgroup
If we run in a container we shouldn't patch around this, and most likely we can't anyway, and there's not much point in complaining about this. Hence let's strictly say: the agent is private property of the host's system instance, nothing else.
This commit is contained in:
parent
de8a711a58
commit
a0c339ed4b
@ -2372,7 +2372,7 @@ int manager_setup_cgroup(Manager *m) {
|
|||||||
|
|
||||||
(void) sd_event_source_set_description(m->cgroup_inotify_event_source, "cgroup-inotify");
|
(void) sd_event_source_set_description(m->cgroup_inotify_event_source, "cgroup-inotify");
|
||||||
|
|
||||||
} else if (MANAGER_IS_SYSTEM(m) && !MANAGER_IS_TEST_RUN(m)) {
|
} else if (MANAGER_IS_SYSTEM(m) && manager_owns_root_cgroup(m) && !MANAGER_IS_TEST_RUN(m)) {
|
||||||
|
|
||||||
/* On the legacy hierarchy we only get notifications via cgroup agents. (Which isn't really reliable,
|
/* On the legacy hierarchy we only get notifications via cgroup agents. (Which isn't really reliable,
|
||||||
* since it does not generate events when control groups with children run empty. */
|
* since it does not generate events when control groups with children run empty. */
|
||||||
|
Loading…
Reference in New Issue
Block a user