Tasks returns the tasks running inside the cgroup along with the subsystem used, pid, and path
(subsystem Name, recursive bool)
| 384 | // Tasks returns the tasks running inside the cgroup along |
| 385 | // with the subsystem used, pid, and path |
| 386 | func (c *cgroup) Tasks(subsystem Name, recursive bool) ([]Task, error) { |
| 387 | c.mu.Lock() |
| 388 | defer c.mu.Unlock() |
| 389 | if c.err != nil { |
| 390 | return nil, c.err |
| 391 | } |
| 392 | return c.processes(subsystem, recursive, cgroupTasks) |
| 393 | } |
| 394 | |
| 395 | func (c *cgroup) processes(subsystem Name, recursive bool, pType procType) ([]Process, error) { |
| 396 | s := c.getSubsystem(subsystem) |