From 5a428a4fbeae7314242460569d459cc3f0bc752d Mon Sep 17 00:00:00 2001 From: atterpac Date: Sat, 18 May 2024 19:40:14 -0600 Subject: [PATCH] fix windows kill --- process/process_windows.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/process/process_windows.go b/process/process_windows.go index 0cad821..c9a57a4 100644 --- a/process/process_windows.go +++ b/process/process_windows.go @@ -19,9 +19,6 @@ func (pm *ProcessManager) StartProcess(ctx context.Context, cancel context.Cance // slog.Warn("No Processes to Start") return } - - // slog.Info("Starting Processes", "count", len(pm.processes)) - for _, p := range pm.Processes { if p.Exec == "KILL_STALE" { continue @@ -57,12 +54,7 @@ func (pm *ProcessManager) StartProcess(ctx context.Context, cancel context.Cance case <-time.After(100 * time.Millisecond): // slog.Debug("Process not terminated... killing", "exec", pr.Exec) } - - // Kill any remaining child processes - if pr.pgid != 0 { - // slog.Debug("Killing process group", "pgid", pr.pgid) - taskKill(-pr.pid) - } + taskKill(pr.pid) } } // slog.Debug("Processes killed")