mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-05 02:30:26 +08:00
* fix(executor): handle turn.completed and terminate process tree on Windows * fix: 修复代码审查发现的安全和资源泄漏问题 修复内容: 1. Windows 测试 taskkill 副作用:fake process 在 Windows 上返回 Pid()==0,避免真实执行 taskkill 2. taskkill PATH 劫持风险:使用 SystemRoot 环境变量构建绝对路径 3. stdinPipe 资源泄漏:在 StdoutPipe() 和 Start() 失败路径关闭 stdinPipe 4. stderr drain 并发语义:移除 500ms 超时,确保 drain 完成后再访问共享缓冲 测试验证: - go test ./... -race 通过 - TestRunCodexTask_ForcesStopAfterTurnCompleted 通过 - TestExecutorSignalAndTermination 通过 Generated with SWE-Agent.ai Co-Authored-By: SWE-Agent.ai <noreply@swe-agent.ai> --------- Co-authored-by: cexll <evanxian9@gmail.com> Co-authored-by: SWE-Agent.ai <noreply@swe-agent.ai>
33 KiB
33 KiB