mirror of
https://github.com/troglobit/finit.git
synced 2026-11-18 19:30:56 +00:00
cgroup: add support for reserved cgroup 'root', for RT tasks
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
dcdc842336
commit
62c5a9d06d
1 file changed
+3
@@ -156,6 +156,9 @@ int cgroup_service(char *name, int pid, struct cgroup *cg)
|
|||||||
if (cg && cg->name[0]) {
|
if (cg && cg->name[0]) {
|
||||||
char path[256];
|
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);
|
snprintf(path, sizeof(path), "/sys/fs/cgroup/%s", cg->name);
|
||||||
if (fisdir(path))
|
if (fisdir(path))
|
||||||
group = cg->name;
|
group = cg->name;
|
||||||
|
|||||||
Reference in new issue
Block a user