zot/internal/agent/tools/bash_windows.go
patriceckhart b6529cf5c4 fix(bash): kill entire process group on cancel
Sets Setpgid on bash commands and sends SIGTERM/SIGKILL to the negative pgid so backgrounded children are cleaned up on esc. Also splits the status bar onto multiple lines on narrow terminals when a spinner is active.
2026-04-23 09:43:57 +02:00

20 lines
275 B
Go

//go:build windows
package tools
import (
"os/exec"
"time"
)
func setProcessGroup(_ *exec.Cmd) {}
func killProcessGroup(cmd *exec.Cmd) {
if cmd.Process == nil {
return
}
_ = cmd.Process.Kill()
time.AfterFunc(3*time.Second, func() {
_ = cmd.Process.Kill()
})
}