Repository navigation
fix(cli): reject FIFO attachments without blocking - #64696
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
The fix works. With the PR's FIFO test, the base hangs until the 25s spawn timeout, and with this change the CLI exits 1 with the existing special-file error before creating a session. I tested on Linux; the full process.test.ts passes (4/4) and tsc -b in packages/cli is clean. O_NONBLOCK makes no difference to reading regular files, and Windows keeps opening with "r", so the size check and read loop behave as before.
Public API: unchanged.
No blocking concerns.
Member
|
LGTM, Thank you! |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #64693
Type of change
What does this PR do?
Open CLI attachments with
O_NONBLOCKon POSIX so a writerless FIFO reaches the existing special-file rejection instead of blocking beforefstat. Keep descriptor-based type/size validation and cleanup. Windows keeps the existing"r"mode.This is a bug fix and needs no feature flag.
How did you verify your code works?
cd packages/cli && bun test test/run/process.test.ts --timeout 30000: 4 pass, covering regular/symlink attachments, FIFO rejection, stdin and signals.bun run typecheck:tscand rootbun run checkpass.Screenshots / recordings
CLI file handling only; no visual change.
Checklist