Skip to content
Open
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
10 changes: 8 additions & 2 deletions src/build/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ export const captureRemote = async (
cmd: string
): Promise<string> => {
try {
// stdin: 'ignore' (≈ ssh -n), never 'inherit'. Concurrent ssh calls that
// inherit the shared interactive stdin fight over fd 0 and block — the
// classic "parallel ssh eats stdin" deadlock that stalls prefetch
// (mkdir/file-check) for later recipes while an earlier build streams.
const { stdout } = await execa('ssh', [target, cmd], {
stdin: 'inherit',
stdin: 'ignore',
stderr: 'inherit',
})
return stdout
Expand Down Expand Up @@ -129,7 +133,9 @@ export const streaming = async (
return
}
const proc = execa(cmd, args, {
stdin: 'inherit',
// ignore (not inherit): a long packer stream must not hold the shared
// stdin and starve concurrent prefetch ssh calls. See captureRemote.
stdin: 'ignore',
stdout: 'pipe',
stderr: 'pipe',
})
Expand Down
Loading