diff --git a/src/cgroup.c b/src/cgroup.c index 371f0511..a2600107 100644 --- a/src/cgroup.c +++ b/src/cgroup.c @@ -156,6 +156,9 @@ int cgroup_service(char *name, int pid, struct cgroup *cg) if (cg && cg->name[0]) { char path[256]; + if (!strcmp(cg->name, "root")) + return fnwrite(str("%d", pid), FINIT_CGPATH "/cgroup.procs"); + snprintf(path, sizeof(path), "/sys/fs/cgroup/%s", cg->name); if (fisdir(path)) group = cg->name;