This function is relevant only with cgroups v1 where it creates
hierarchy for controllers that are not managed by systemd. PID is used
to detect a placement of current process but in this situation we are
building the hierarchy for already known placement.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
static int
virCgroupEnableMissingControllers(char *path,
- pid_t pidleader,
int controllers,
virCgroupPtr *group)
{
g_autoptr(virCgroup) parent = NULL;
char *offset = path;
- if (virCgroupNew(pidleader,
+ if (virCgroupNew(-1,
"/",
controllers,
&parent) < 0)
return -2;
}
- if (virCgroupEnableMissingControllers(path, pidleader,
- controllers, &newGroup) < 0) {
+ if (virCgroupEnableMissingControllers(path, controllers, &newGroup) < 0)
return -1;
- }
if (virCgroupAddProcess(newGroup, pidleader) < 0) {
virErrorPtr saved;