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

Method Freeze

cgroup1/cgroup.go:431–446  ·  view source on GitHub ↗

Freeze freezes the entire cgroup and all the processes inside it

()

Source from the content-addressed store, hash-verified

429
430// Freeze freezes the entire cgroup and all the processes inside it
431func (c *cgroup) Freeze() error {
432 c.mu.Lock()
433 defer c.mu.Unlock()
434 if c.err != nil {
435 return c.err
436 }
437 s := c.getSubsystem(Freezer)
438 if s == nil {
439 return ErrFreezerNotSupported
440 }
441 sp, err := c.path(Freezer)
442 if err != nil {
443 return err
444 }
445 return s.(*freezerController).Freeze(sp)
446}
447
448// Thaw thaws out the cgroup and all the processes inside it
449func (c *cgroup) Thaw() error {

Callers

nothing calls this directly

Calls 2

getSubsystemMethod · 0.95
FreezeMethod · 0.65

Tested by

no test coverage detected