summaryrefslogtreecommitdiff
path: root/src/cgroup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-12 22:15:59 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-12 22:16:02 +0200
commite5a53dc74636ffa9de639733a0bef65f967c9ffa (patch)
treea18ea542746ab837eab968c64bf7ca945a266ec3 /src/cgroup.c
parent81481c99c2c60a72e4a3e189565f1e786bfbe588 (diff)
cgroup: be nice to Ingo Molnar
https://bugzilla.redhat.com/show_bug.cgi?id=628004
Diffstat (limited to 'src/cgroup.c')
-rw-r--r--src/cgroup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cgroup.c b/src/cgroup.c
index 5864858dd7..ca19a4fd47 100644
--- a/src/cgroup.c
+++ b/src/cgroup.c
@@ -225,6 +225,12 @@ int manager_setup_cgroup(Manager *m) {
assert(m);
+ /* 0. Be nice to Ingo Molnar #628004 */
+ if (path_is_mount_point("/sys/fs/cgroup/systemd") <= 0) {
+ log_warning("No control group support available, not creating root group.");
+ return 0;
+ }
+
/* 1. Determine hierarchy */
if ((r = cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, 0, &current)) < 0) {
log_error("Cannot determine cgroup we are running in: %s", strerror(-r));