fix: 修复 Windows Codex 进程完成后不自动退出问题 (v1.7.21)

问题根因:
1. messageTimerCh 中阻塞等待 waitCh 导致无限挂起
2. Windows 上 proc.Kill() 只杀主进程不杀子进程

解决方案:
1. 移除 messageTimerCh case 中的阻塞等待
2. 新增 killProcessTree() 使用 taskkill /T /F /PID 终止进程树
3. 修改 terminateCommand/terminateProcess/forwardSignals 使用进程树终止
This commit is contained in:
li committed 2026-01-13 16:32:28 +08:00
1 parent e5cfdee7a9
commit 1237d2bfe0
5 files changed
+123 -15

No files matched your search

+3 -3
View File
@@ -3067,7 +3067,7 @@ func TestVersionFlag(t *testing.T) {
}
})
want := "codeagent-wrapper version 5.4.0\n"
want := "codeagent-wrapper version 5.6.0\n"
if output != want {
t.Fatalf("output = %q, want %q", output, want)
@@ -3083,7 +3083,7 @@ func TestVersionShortFlag(t *testing.T) {
}
})
want := "codeagent-wrapper version 5.4.0\n"
want := "codeagent-wrapper version 5.6.0\n"
if output != want {
t.Fatalf("output = %q, want %q", output, want)
@@ -3099,7 +3099,7 @@ func TestVersionLegacyAlias(t *testing.T) {
}
})
want := "codex-wrapper version 5.4.0\n"
want := "codex-wrapper version 5.6.0\n"
if output != want {
t.Fatalf("output = %q, want %q", output, want)