windows: fix inefficient gathering of task processes (#20619)

* windows: fix inefficient gathering of task processes

* return set of just executor pid in case of ps error
This commit is contained in:
Seth Hoenig
2024-05-17 09:46:23 -05:00
committed by GitHub
parent a6f6384b71
commit 7d00a494d9
8 changed files with 185 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ func withNetworkIsolation(f func() error, _ *drivers.NetworkIsolationSpec) error
func setCmdUser(*exec.Cmd, string) error { return nil }
func (e *UniversalExecutor) ListProcesses() *set.Set[int] {
func (e *UniversalExecutor) ListProcesses() set.Collection[int] {
return procstats.List(e.childCmd.Process.Pid)
}