fix(process): kill 兜底弃 taskkill 命令行, 改 Windows API 进程树强杀
- Toolhelp32 快照枚举父子关系→收集后代(防环)→OpenProcess+TerminateProcess 按 PID 定向结束 - 产品红线: 系统操作禁拼 cmd 命令字符串(2026-10-09 用户令, 与 zomaintain AGENTS §一同源) - wire 不变: 仅错误文案 taskkill 段改'进程树终止'
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
//go:build !windows
|
||||
|
||||
// 非 Windows 无进程树兜底(killProcess 仅 Windows 分支调用)。
|
||||
package process
|
||||
|
||||
import "errors"
|
||||
|
||||
func killProcessTree(root uint32) error {
|
||||
return errors.New("kill tree 仅支持 Windows")
|
||||
}
|
||||
Reference in New Issue
Block a user