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

Method changeState

cgroup1/freezer.go:52–58  ·  view source on GitHub ↗
(path string, state State)

Source from the content-addressed store, hash-verified

50}
51
52func (f *freezerController) changeState(path string, state State) error {
53 return os.WriteFile(
54 filepath.Join(f.root, path, "freezer.state"),
55 []byte(strings.ToUpper(string(state))),
56 defaultFilePerm,
57 )
58}
59
60func (f *freezerController) state(path string) (State, error) {
61 current, err := os.ReadFile(filepath.Join(f.root, path, "freezer.state"))

Callers 1

waitStateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected