diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2018-04-03 16:04:22 +0300 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | bedc76bafeb76445e5a2228a56ef661d9203bf79 (patch) | |
tree | ee29c413776c3fc5fc8112d79dc0222b58c1c6a5 /src/core | |
parent | 2ad43d5ff82afd086ad0a6ca1055dca32c828596 (diff) |
core: skip the removal of cgroups in the TEST_RUN_MINIMAL mode (#8622)
When `systemd` is run in the TEST_RUN_MINIMAL mode, it doesn't really
set up cgroups, so it shouldn't try to remove anything.
Closes https://github.com/systemd/systemd/issues/8474.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 7b9e29b6f..429d4ca38 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -2340,7 +2340,7 @@ void manager_shutdown_cgroup(Manager *m, bool delete) { #if 0 /// elogind is not init /* We can't really delete the group, since we are in it. But * let's trim it. */ - if (delete && m->cgroup_root) + if (delete && m->cgroup_root && m->test_run_flags != MANAGER_TEST_RUN_MINIMAL) (void) cg_trim(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, false); m->cgroup_empty_event_source = sd_event_source_unref(m->cgroup_empty_event_source); |