MCPcopy Create free account
hub / github.com/containerd/cgroups / Tasks

Method Tasks

cgroup1/cgroup.go:386–393  ·  view source on GitHub ↗

Tasks returns the tasks running inside the cgroup along with the subsystem used, pid, and path

(subsystem Name, recursive bool)

Source from the content-addressed store, hash-verified

384// Tasks returns the tasks running inside the cgroup along
385// with the subsystem used, pid, and path
386func (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
395func (c *cgroup) processes(subsystem Name, recursive bool, pType procType) ([]Process, error) {
396 s := c.getSubsystem(subsystem)

Callers

nothing calls this directly

Calls 1

processesMethod · 0.95

Tested by

no test coverage detected