I have a process running in a docker container
(docker puts that processes in a cgroup btw). The process forks and I want to put some forks
into cgroups
.
I added the following code to my program:
cgroup_init();
struct cgroup *my_cgroup = cgroup_new_cgroup(cg_name);
cgroup_add_controller(my_cgroup, "cpu");
int cgroup_cr = cgroup_create_cgroup_from_parent(my_cgroup, 0);
The cgroup_r is 50007 ("Cgroup, operation not allowed"). I don't know why that is? Is there some configuration I need to change? Is a capability needed?