fix(review round 1, own slice): plugin welcome-gap counting + null-id guard; bridge setup group-kill; Makefile staticcheck gate + worker-image rsync; deploy excludes
This commit is contained in:
+10
-2
@@ -17,15 +17,23 @@ async function runRepoSetup() {
|
||||
if (!existsSync(SETUP_PATH)) return;
|
||||
console.error(`[lvmh-bridge] running repo setup: ${SETUP_PATH}`);
|
||||
const code = await new Promise((resolve) => {
|
||||
// detached + negative-pid kill: take down the whole process group so
|
||||
// setup grandchildren cannot outlive the timeout (node-as-PID1 never
|
||||
// reaps adopted orphans).
|
||||
const child = spawn("bash", [SETUP_PATH], {
|
||||
cwd: "/workspace",
|
||||
detached: true,
|
||||
stdio: ["ignore", "inherit", "inherit"],
|
||||
});
|
||||
const timer = setTimeout(() => {
|
||||
console.error(
|
||||
`[lvmh-bridge] setup timed out after ${SETUP_TIMEOUT_MS}ms, killing`,
|
||||
`[lvmh-bridge] setup timed out after ${SETUP_TIMEOUT_MS}ms, killing process group`,
|
||||
);
|
||||
child.kill("SIGKILL");
|
||||
try {
|
||||
process.kill(-child.pid, "SIGKILL");
|
||||
} catch {
|
||||
child.kill("SIGKILL");
|
||||
}
|
||||
resolve(124);
|
||||
}, SETUP_TIMEOUT_MS);
|
||||
timer.unref?.();
|
||||
|
||||
Reference in New Issue
Block a user