fix(release): terminate command descendants on signal · openclaw/openclaw@51d1789
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4034,13 +4034,14 @@ async function runCommandInvocation(invocation, options) {
|
4034 | 4034 | |
4035 | 4035 | child.on("close", (exitCode) => { |
4036 | 4036 | if (forwardedSignalExitCode !== undefined) { |
| 4037 | +// The leader can exit on SIGTERM while descendants remain in its group. |
| 4038 | +// Kill the group before unregistering so signal forwarding cannot leave them running. |
4037 | 4039 | activeChildTree.killChildTree("SIGKILL"); |
4038 | | -} |
4039 | | -activeChildTree.unregister(); |
4040 | | -if (forwardedSignalExitCode !== undefined) { |
| 4040 | +activeChildTree.unregister(); |
4041 | 4041 | finalize(exitForwardedSignalWhenChildTreesDone); |
4042 | 4042 | return; |
4043 | 4043 | } |
| 4044 | +activeChildTree.unregister(); |
4044 | 4045 | finalize(() => { |
4045 | 4046 | const result = { |
4046 | 4047 | exitCode: exitCode ?? 1, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。