picoclaw/pkg/tools/shell_process_windows.go
dj-oyu 979b73510a refactor: normalize blank lines to match upstream style
Remove extra blank lines between statements that upstream has removed,
reducing merge conflict surface. Only blank-line-only differences are
affected — no behavioral changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 03:34:44 +09:00

27 lines
418 B
Go

//go:build windows
package tools
import (
"os/exec"
"strconv"
)
func prepareCommandForTermination(cmd *exec.Cmd) {
// no-op on Windows
}
func terminateProcessTree(cmd *exec.Cmd) error {
if cmd == nil || cmd.Process == nil {
return nil
}
pid := cmd.Process.Pid
if pid <= 0 {
return nil
}
_ = exec.Command("taskkill", "/T", "/F", "/PID", strconv.Itoa(pid)).Run()
_ = cmd.Process.Kill()
return nil
}