Skip to content

Commit

Permalink
fix windows kill
Browse files Browse the repository at this point in the history
  • Loading branch information
atterpac committed May 19, 2024
1 parent 583407a commit 5a428a4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions process/process_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 5a428a4

Please sign in to comment.