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

Method State

cgroup1/cgroup.go:506–526  ·  view source on GitHub ↗

State returns the state of the cgroup and its processes

()

Source from the content-addressed store, hash-verified

504
505// State returns the state of the cgroup and its processes
506func (c *cgroup) State() State {
507 c.mu.Lock()
508 defer c.mu.Unlock()
509 c.checkExists()
510 if c.err != nil && c.err == ErrCgroupDeleted {
511 return Deleted
512 }
513 s := c.getSubsystem(Freezer)
514 if s == nil {
515 return Thawed
516 }
517 sp, err := c.path(Freezer)
518 if err != nil {
519 return Unknown
520 }
521 state, err := s.(*freezerController).state(sp)
522 if err != nil {
523 return Unknown
524 }
525 return state
526}
527
528// MoveTo does a recursive move subsystem by subsystem of all the processes
529// inside the group

Callers

nothing calls this directly

Calls 3

checkExistsMethod · 0.95
getSubsystemMethod · 0.95
stateMethod · 0.80

Tested by

no test coverage detected