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

Function remove

cgroup2/utils.go:56–69  ·  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

54// remove will remove a cgroup path handling EAGAIN and EBUSY errors and
55// retrying the remove after a exp timeout
56func remove(path string) error {
57 var err error
58 delay := 10 * time.Millisecond
59 for i := 0; i < 5; i++ {
60 if i != 0 {
61 time.Sleep(delay)
62 delay *= 2
63 }
64 if err = os.RemoveAll(path); err == nil {
65 return nil
66 }
67 }
68 return fmt.Errorf("cgroups: unable to remove path %q: %w", path, err)
69}
70
71// parseCgroupTasksFile parses /sys/fs/cgroup/$GROUPPATH/cgroup.procs or
72// /sys/fs/cgroup/$GROUPPATH/cgroup.threads

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…