diff --git a/libprocessgroup/cgroup_map.cpp b/libprocessgroup/cgroup_map.cpp index ac369d2bd..ce7f10b00 100644 --- a/libprocessgroup/cgroup_map.cpp +++ b/libprocessgroup/cgroup_map.cpp @@ -234,7 +234,12 @@ int CgroupMap::ActivateControllers(const std::string& path) const { std::string str("+"); str.append(ACgroupController_getName(controller)); if (!WriteStringToFile(str, path + "/cgroup.subtree_control")) { - return -errno; + if (flags & CGROUPRC_CONTROLLER_FLAG_OPTIONAL) { + PLOG(WARNING) << "Activation of cgroup controller " << str + << " failed in path " << path; + } else { + return -errno; + } } } }