()
| 770 | } |
| 771 | |
| 772 | func (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 |
| 785 | func (c *Manager) MemoryEventFD() (int, uint32, error) { |
no test coverage detected