Commit 3940411
committed
fix(cli): clear a stale run-activity marker when spawning the binary
Review feedback on #1258: if the binary dies via SIGKILL or a native
crash, `process.on('exit', clear)` never runs and the marker outlives it
in tmpdir. Reach that pid again and the leaked file stalls the new run's
updates for the whole RUN_IDLE_MAX_WAIT_MS bound.
Clear it at spawn rather than stamping the marker with an identity to
cross-check. At the moment spawnInstalledBinary has the child's pid, the
binary has not booted, let alone started a turn -- so a marker at that
path is definitionally someone else's, and no session id is needed to
tell the two apart.
Claude-Session: https://claude.ai/code/session_018vPhyqaaoKa8cgs7GEnyq51 parent b30d956 commit 3940411
2 files changed
Lines changed: 70 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
941 | 941 | | |
942 | 942 | | |
943 | 943 | | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
944 | 960 | | |
945 | 961 | | |
946 | 962 | | |
| |||
1305 | 1321 | | |
1306 | 1322 | | |
1307 | 1323 | | |
| 1324 | + | |
| 1325 | + | |
1308 | 1326 | | |
1309 | 1327 | | |
1310 | 1328 | | |
| |||
1500 | 1518 | | |
1501 | 1519 | | |
1502 | 1520 | | |
| 1521 | + | |
1503 | 1522 | | |
1504 | 1523 | | |
1505 | 1524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
250 | 301 | | |
251 | 302 | | |
252 | 303 | | |
| |||
0 commit comments