fix: preserve child signal termination during CLI respawn (#144838)

Preserve actual Unix child termination signals through startup respawns so supervisors stop interrupted runtimes without entering watcher recovery. Keep explicit numeric exits and Windows termination behavior intact.

Fixes #144200.
This commit is contained in:
Shakker 2026-09-11 12:05:59 +01:00 • committed by GitHub
parent fe286b40e9
commit 53200287f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 290 additions and 48 deletions

View file

@ -151,6 +151,10 @@ export const runRespawnedChild = (command, args, env) => {
child.once("exit", (code, signal) => {
detach();
if (signal) {
if (process.platform !== "win32") {
process.kill(process.pid, signal);
return;
}
const forwardedSignalExitCode =
!hardKillBackstopStarted && signal === firstForwardedSignal
? signal === "SIGINT"