AddProc moves the provided process id into the new cgroup. Without additional arguments, the process with the given id is added to all the cgroup subsystems. When giving AddProc a list of subsystem names, the process id is only added to those subsystems, provided that they are active in the targeted
(pid uint64, subsystems ...Name)
| 185 | // id is only added to those subsystems, provided that they are active in the targeted |
| 186 | // cgroup. |
| 187 | func (c *cgroup) AddProc(pid uint64, subsystems ...Name) error { |
| 188 | return c.add(Process{Pid: int(pid)}, cgroupProcs, subsystems...) |
| 189 | } |
| 190 | |
| 191 | // AddTask moves the provided tasks (threads) into the new cgroup. |
| 192 | // Without additional arguments, the task is added to all the cgroup subsystems. |