Skip to content

Commit e187c48

Browse files
fix(cli): bound the launcher's process-table read during forced stop
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent c8d50c3 commit e187c48

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎scripts/npm-launcher/t3.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ async function main() {
219219
function killTree(child) {
220220
const pids = [child.pid];
221221
if (process.platform !== "win32") {
222-
const table = spawnSync("ps", ["-A", "-o", "pid=,ppid="], { encoding: "utf8" }).stdout || "";
222+
const table =
223+
spawnSync("ps", ["-A", "-o", "pid=,ppid="], { encoding: "utf8", timeout: 2_000 }).stdout ||
224+
"";
223225
const rows = table
224226
.trim()
225227
.split("\n")

0 commit comments

Comments
 (0)