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

Method AddProc

cgroup1/cgroup.go:187–189  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

185// id is only added to those subsystems, provided that they are active in the targeted
186// cgroup.
187func (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.

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected