fix: address Copilot review round 4 (#2339)
Handle SIGQUIT (Ctrl-\) on the same tree-shutdown path as SIGINT, SIGTERM and SIGHUP. The gate runs in its own process group, so a signal the wrapper does not handle ends the wrapper alone and orphans the gate behind a lease that then goes stale under it. The signal test is parametrized over SIGTERM (143) and SIGQUIT (131). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
d3e5432532
commit
17e85a8745
1 changed files with 66 additions and 51 deletions
|
|
@ -468,7 +468,11 @@ export async function runUnderLease({
|
|||
);
|
||||
};
|
||||
|
||||
const signals = ["SIGINT", "SIGTERM", "SIGHUP"];
|
||||
// Every signal a terminal or a supervisor sends to end a run: Ctrl-C, a
|
||||
// plain kill, a closed terminal, and Ctrl-\ — the child is in its own
|
||||
// group, so any of these left unhandled would end this process and
|
||||
// orphan the gate behind a lease that then goes stale under it.
|
||||
const signals = ["SIGINT", "SIGTERM", "SIGHUP", "SIGQUIT"];
|
||||
let stoppedBy = null;
|
||||
let escalation = null;
|
||||
let handlers = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue