Skip to content

Commit c645ec4

Browse files
committed
fix(release): terminate command descendants on signal
1 parent c04126a commit c645ec4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/openclaw-cross-os-release-checks.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4030,11 +4030,15 @@ async function runCommandInvocation(invocation, options) {
40304030
});
40314031

40324032
child.on("close", (exitCode) => {
4033-
activeChildTree.unregister();
40344033
if (forwardedSignalExitCode !== undefined) {
4034+
// The leader can exit on SIGTERM while descendants remain in its group.
4035+
// Kill the group before unregistering so signal forwarding cannot leave them running.
4036+
activeChildTree.killChildTree("SIGKILL");
4037+
activeChildTree.unregister();
40354038
finalize(exitForwardedSignalWhenChildTreesDone);
40364039
return;
40374040
}
4041+
activeChildTree.unregister();
40384042
finalize(() => {
40394043
const result = {
40404044
exitCode: exitCode ?? 1,

0 commit comments

Comments
 (0)