AddTask moves the provided tasks (threads) into the new cgroup. Without additional arguments, the task is added to all the cgroup subsystems. When giving AddTask a list of subsystem names, the task is only added to those subsystems, provided that they are active in the targeted cgroup.
(process Process, subsystems ...Name)
| 193 | // When giving AddTask a list of subsystem names, the task is only added to those |
| 194 | // subsystems, provided that they are active in the targeted cgroup. |
| 195 | func (c *cgroup) AddTask(process Process, subsystems ...Name) error { |
| 196 | return c.add(process, cgroupTasks, subsystems...) |
| 197 | } |
| 198 | |
| 199 | // writeCgroupProcs writes to the file, but retries on EINVAL. |
| 200 | func writeCgroupProcs(path string, content []byte, perm fs.FileMode) error { |