diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-10-10 12:36:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 12:36:16 +0200 |
commit | f436470ae110404ec84dd8d01df9351c0f7ddb7a (patch) | |
tree | 54f8c699f8478810cab553506d5b8357d744a96e /src/core/cgroup.c | |
parent | Merge pull request #10349 from poettering/bus-creds-shift-overflow (diff) | |
parent | core: include environment generator runtime in generator timestamps (diff) | |
download | systemd-f436470ae110404ec84dd8d01df9351c0f7ddb7a.tar.xz systemd-f436470ae110404ec84dd8d01df9351c0f7ddb7a.zip |
Merge pull request #10343 from poettering/manager-state-fix
various fixes for PID1's Manager object
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r-- | src/core/cgroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index a34df2538f..9f5e67ba22 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -2362,7 +2362,7 @@ int manager_setup_cgroup(Manager *m) { (void) sd_event_source_set_description(m->cgroup_inotify_event_source, "cgroup-inotify"); - } else if (MANAGER_IS_SYSTEM(m) && m->test_run_flags == 0) { + } else if (MANAGER_IS_SYSTEM(m) && !MANAGER_IS_TEST_RUN(m)) { /* 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. */ @@ -2391,11 +2391,11 @@ int manager_setup_cgroup(Manager *m) { if (m->pin_cgroupfs_fd < 0) return log_error_errno(errno, "Failed to open pin file: %m"); - } else if (!m->test_run_flags) + } else if (!MANAGER_IS_TEST_RUN(m)) return log_error_errno(r, "Failed to create %s control group: %m", scope_path); /* 7. Always enable hierarchical support if it exists... */ - if (!all_unified && m->test_run_flags == 0) + if (!all_unified && !MANAGER_IS_TEST_RUN(m)) (void) cg_set_attribute("memory", "/", "memory.use_hierarchy", "1"); /* 8. Figure out which controllers are supported */ |