Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/subprocess/subprocess-local/tests/spawn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ async function waitGone(pid: number, timeoutMs = 5_000): Promise<void> {
const state = stat.slice(stat.lastIndexOf(')') + 2, stat.lastIndexOf(')') + 3)
if (state === 'Z' || state === 'X') return
} catch (error: unknown) {
if ((error as NodeJS.ErrnoException).code === 'ENOENT') return
// ESRCH = the pid vanished between the kill-0 probe and this read,
// which is the same terminal state ENOENT reports on a settled entry.
if ((error as NodeJS.ErrnoException).code === 'ENOENT' || (error as NodeJS.ErrnoException).code === 'ESRCH') return
throw error
}
}
Expand Down
Loading