Files
morluto b6e107aded fix(process): quiesce terminal producers before final observation
Stop interactions and sampling before final observation, and stop the owned
target before failure-path rendering. Cache finalized terminal facts through
disposal and cleanup retry while preserving the original failure.

Version deferred terminal observation order for every normalization profile,
including disabled PID and port normalization. Add public CLI/MCP descendant,
partial-evidence and compatibility controls without replacing upstream owners.

Fixes #6443
2026-10-24 06:24:55 +08:00

30 lines
760 B
JavaScript

import { spawn } from "node:child_process";
import { writeFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
if (process.argv[2] === "child") {
setTimeout(() => {}, 1_000);
} else {
const child = spawn(
process.execPath,
[fileURLToPath(import.meta.url), "child"],
{
stdio: "inherit",
},
);
child.on("error", (cause) => {
throw cause;
});
if (child.pid === undefined) throw new Error("Child did not launch");
writeFileSync(
process.argv[2],
JSON.stringify({ root_pid: process.pid, child_pid: child.pid }),
);
process.stdout.write(
`root pid ${process.pid}\nchild pid ${child.pid}\ncount 9007199254740991\n`,
);
child.on("exit", (code) => {
process.exitCode = code ?? 1;
});
}