@botlearn-course/daemon 0.0.29-beta.4 → 0.0.29-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,13 +89,10 @@ function terminate(child) {
|
|
|
89
89
|
child.once("close", () => clearTimeout(timer));
|
|
90
90
|
}
|
|
91
91
|
// Pi can be terminated by the outer runtime before its tool signal is delivered.
|
|
92
|
+
// Leave process exit to Pi's native handler, which also stops detached bash children.
|
|
92
93
|
process.once("SIGTERM", () => {
|
|
93
94
|
for (const child of active)
|
|
94
95
|
terminate(child);
|
|
95
|
-
if (active.size === 0)
|
|
96
|
-
process.exit(143);
|
|
97
|
-
const timer = setTimeout(() => process.exit(143), KILL_GRACE_MS + 50);
|
|
98
|
-
timer.unref();
|
|
99
96
|
});
|
|
100
97
|
export async function runWorker(config, manifestPath, cwd, task, signal, step) {
|
|
101
98
|
if (signal?.aborted)
|