mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-07 18:42:25 +00:00
fix(release): terminate command descendants on signal
This commit is contained in:
@@ -4034,13 +4034,14 @@ async function runCommandInvocation(invocation, options) {
|
||||
|
||||
child.on("close", (exitCode) => {
|
||||
if (forwardedSignalExitCode !== undefined) {
|
||||
// The leader can exit on SIGTERM while descendants remain in its group.
|
||||
// Kill the group before unregistering so signal forwarding cannot leave them running.
|
||||
activeChildTree.killChildTree("SIGKILL");
|
||||
}
|
||||
activeChildTree.unregister();
|
||||
if (forwardedSignalExitCode !== undefined) {
|
||||
activeChildTree.unregister();
|
||||
finalize(exitForwardedSignalWhenChildTreesDone);
|
||||
return;
|
||||
}
|
||||
activeChildTree.unregister();
|
||||
finalize(() => {
|
||||
const result = {
|
||||
exitCode: exitCode ?? 1,
|
||||
|
||||
Reference in New Issue
Block a user