Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a missing agent binary no longer reads as a wrapper kill #15344

MergedMoinax(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/15344/headmerged by maria-rcks View on GitHub

Showing 1 changed file with 7 additions and 0 deletions.

x
0 of 1 viewed, 1 left
7 additions and 0 deletionspackages/provider-acp/src/server/AcpSessionRuntime.tsModified
View file
@@ -285,6 +285,13 @@
'[ "$actual" = "$expected" ] || exit 126',
"unset ELECTRON_RUN_AS_NODE T3_ACP_CGROUP_WRAPPER",
"trap 'exit 125' 0",
+ // The trap alone does not cover a failed `exec`: bash — which is
+ // /bin/sh on Arch derivatives — exits 127 without running the EXIT
+ // trap, so a missing agent binary reported "killed by the wrapper"
+ // instead of "never launched". The caller always hands us an absolute
+ // target, so test it as an executable file rather than asking the
+ // shell to resolve it.
+ '[ -f "$1" ] && [ -x "$1" ] || exit 125',
'exec "$@"',
].join("\n"),
"t3-acp-cgroup-wrapper",