State returns the state of the cgroup and its processes
()
| 504 | |
| 505 | // State returns the state of the cgroup and its processes |
| 506 | func (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 |
nothing calls this directly
no test coverage detected