Files
cindy/packages/maker-core
Dash 093937d9c5 fix(desktop): 退出时回收 Codex 工具启动的后代进程 (#6030)
* fix(desktop): 退出时回收 Codex 工具后代进程树

Cindy 退出时 Codex app-server 收到 EOF 退出,但 exec_command 启动的
工具后代(如 xcodebuild → swift-frontend)不会被结束,变成孤儿继续运行。
在退出 sync 阶段、shutdown-maker 之前,按 PPID 链结束本实例 Codex
app-server 下的全部工具进程树;app-server 自身仍走 EOF 优雅关闭。

Fixes #6024

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(maker-core): Codex app-server 退出后注销进程登记

onProcessSpawned 丢弃了登记函数返回的 disposer,app-server 退出后
登记一直残留。退出回收按登记认领 PID,残留登记遇到同父进程的 PID
复用会误杀无关进程树。把 disposer 交回 transport,在真实退出时注销。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-15 19:51:06 +08:00
..