Repository navigation
Commit 0a8ecc6
fix(codex): exit reaper kills the whole app-server tree on Windows (PR #346 review P1)
The leak-fix exit reaper called this.proc.kill("SIGKILL") unconditionally, but on
Windows the client is spawned with shell:true, so this.proc is cmd.exe and the
real codex app-server is its child — a flat SIGKILL kills only the shell and
leaks the app-server. Mirror close()'s platform branch: on Windows use
terminateProcessTree (synchronous taskkill /T /F, safe in an exit handler) to
kill the whole tree; non-Windows keeps the direct-child SIGKILL.
(The P2 zombie note is addressed in-thread: the SIGKILL backstop is the right
tradeoff — close() reaps in the normal path, the orphan is reaped by init on any
normal host, and not killing reinstates the worse live-process leak.)
Suite 119/119.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 4ebc407 commit 0a8ecc6
1 file changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
| 201 | + | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
207 | 218 | | |
208 | 219 | | |
209 | 220 | | |
| |||
0 commit comments