Merge "libprocessgroup: Proceed if activation of an optional controller fails"

This commit is contained in:
Bart Van Assche 2023-02-13 18:06:49 +00:00 committed by Gerrit Code Review
commit 05c7e3c0c2

View file

@ -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;
}
}
}
}