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

Function remove

cgroup1/utils.go:70–82  ·  view source on GitHub ↗

remove will remove a cgroup path handling EAGAIN and EBUSY errors and retrying the remove after a exp timeout

(path string)

Source from the content-addressed store, hash-verified

68// remove will remove a cgroup path handling EAGAIN and EBUSY errors and
69// retrying the remove after a exp timeout
70func remove(path string) error {
71 delay := 10 * time.Millisecond
72 for i := 0; i < 5; i++ {
73 if i != 0 {
74 time.Sleep(delay)
75 delay *= 2
76 }
77 if err := os.RemoveAll(path); err == nil {
78 return nil
79 }
80 }
81 return fmt.Errorf("cgroups: unable to remove path %q", path)
82}
83
84// readPids will read all the pids of processes or tasks in a cgroup by the provided path
85func readPids(path string, subsystem Name, pType procType) ([]Process, error) {

Callers 1

DeleteMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…