Repository navigation
Commit 6ab8963
fix(server): a missing agent binary no longer reads as a wrapper kill
The Linux cgroup wrapper reserves 125 for "could not start the target" and
produces it with `trap 'exit 125' 0`. That trap does not cover a failed
`exec`: dash runs the EXIT trap, bash does not. Where `/bin/sh` is bash —
Arch and its derivatives — a missing agent binary exits 127 instead, and the
session reports the wrapper as having killed the agent rather than never
having launched it.
Resolve the target before the `exec`. `command -v` handles PATH names and
absolute paths in every POSIX shell, so the documented 125 holds whichever
shell `/bin/sh` is.
The expected behaviour is already pinned by the missing-target assertion in
AcpSessionRuntime.processTree.test.ts, which fails with "expected 127 to be
125" on a bash-as-/bin/sh host without this.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent 71dbaf1 commit 6ab8963
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
285 | 291 | | |
286 | 292 | | |
287 | 293 | | |
| |||
0 commit comments