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

Method isCgroupEmpty

cgroup2/manager.go:772–782  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

770}
771
772func (c *Manager) isCgroupEmpty() bool {
773 // In case of any error we return true so that we exit and don't leak resources
774 out := make(map[string]uint64)
775 if err := readKVStatsFile(c.path, "cgroup.events", out); err != nil {
776 return true
777 }
778 if v, ok := out["populated"]; ok {
779 return v == 0
780 }
781 return true
782}
783
784// MemoryEventFD returns inotify file descriptor and 'memory.events' inotify watch descriptor
785func (c *Manager) MemoryEventFD() (int, uint32, error) {

Callers 1

EventChanMethod · 0.95

Calls 1

readKVStatsFileFunction · 0.85

Tested by

no test coverage detected