func (m *Manager) GetAllPids() ([]int, error) { path, err := getSubsystemPath(m.Cgroups, "devices") if err != nil { return nil, err } return cgroups.GetAllPids(path) }
func (m *Manager) GetAllPids() ([]int, error) { dir, err := getCgroupPath(m.Cgroups) if err != nil { return nil, err } return cgroups.GetAllPids(dir) }
func (stopper *CgroupStopper) killAllRemaining(signal syscall.Signal, cgroupPath string, exceptions []int) error { pidsInCgroup, err := cgroups.GetAllPids(cgroupPath) if err != nil { return err } var pidsToKill []int for _, pid := range pidsInCgroup { if contains(exceptions, pid) { continue } pidsToKill = append(pidsToKill, pid) } if len(pidsToKill) == 0 { return nil } stopper.killer.Kill(signal, pidsToKill...) return fmt.Errorf("still running after signal %s, %v", signal, pidsToKill) }
func (m *Manager) GetAllPids() ([]int, error) { paths := m.GetPaths() return cgroups.GetAllPids(paths["devices"]) }