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

Function NestedPath

cgroup1/paths.go:40–46  ·  view source on GitHub ↗

NestedPath will nest the cgroups based on the calling processes cgroup placing its child processes inside its own path

(suffix string)

Source from the content-addressed store, hash-verified

38// NestedPath will nest the cgroups based on the calling processes cgroup
39// placing its child processes inside its own path
40func NestedPath(suffix string) Path {
41 paths, err := ParseCgroupFile("/proc/self/cgroup")
42 if err != nil {
43 return errorPath(err)
44 }
45 return existingPath(paths, suffix)
46}
47
48// PidPath will return the correct cgroup paths for an existing process running inside a cgroup
49// This is commonly used for the Load function to restore an existing container

Callers 1

TestSelfPathFunction · 0.85

Calls 3

ParseCgroupFileFunction · 0.85
errorPathFunction · 0.85
existingPathFunction · 0.85

Tested by 1

TestSelfPathFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…