fix(cli): ensure blocking stdio#2173
Draft
wan9chi wants to merge 1 commit into
Draft
Conversation
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Native binary sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
vp (Linux x64) |
Binary | 10.32 MiB | 10.32 MiB | 0 B (0.00%) |
vp (Linux x64) |
gzip -9 | 4.42 MiB | 4.42 MiB | +476 B (+0.01%) |
| NAPI (Linux x64) | Binary | 33.42 MiB | 33.42 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | gzip -9 | 12.78 MiB | 12.78 MiB | +502 B (+0.00%) |
vp (macOS ARM64) |
Binary | 7.64 MiB | 7.65 MiB | +16.13 KiB (+0.21%) |
vp (macOS ARM64) |
gzip -9 | 3.83 MiB | 3.83 MiB | +333 B (+0.01%) |
| NAPI (macOS ARM64) | Binary | 40.78 MiB | 40.78 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | gzip -9 | 17.05 MiB | 17.05 MiB | -225 B (-0.00%) |
vp (Windows x64) |
Binary | 8.37 MiB | 8.37 MiB | 0 B (0.00%) |
vp (Windows x64) |
gzip -9 | 3.64 MiB | 3.64 MiB | +1 B (+0.00%) |
| NAPI (Windows x64) | Binary | 27.88 MiB | 27.88 MiB | +512 B (+0.00%) |
| NAPI (Windows x64) | gzip -9 | 10.78 MiB | 10.78 MiB | +20 B (+0.00%) |
| Trampoline (Windows x64) | Binary | 203.00 KiB | 203.00 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 97.91 KiB | 97.91 KiB | 0 B (0.00%) |
| Installer (Windows x64) | Binary | 4.46 MiB | 4.46 MiB | 0 B (0.00%) |
| Installer (Windows x64) | gzip -9 | 2.08 MiB | 2.08 MiB | 0 B (0.00%) |
31fc7dc to
82821df
Compare
aaa12f4 to
4bdb273
Compare
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.

Summary
O_NONBLOCKfrom non-TTY stdin, stdout, and stderr at process entryRoot cause
Node marks non-TTY stdio as non-blocking, and the flag is shared with inherited child descriptors. Rust's standard I/O and embedded dependencies assume blocking writes, so a full consumer pipe can return
EAGAIN, truncate diagnostics, or panic.This PR is intentionally scoped to restoring blocking stdio. It does not add write-site retries or
io::Resultpropagation.Fixes #2165.
Validation
cargo test -p vite_shared clears_nonblocking_from_a_non_tty_file_descriptionpnpm -F vite-plus buildjust snapshot-test check_backpressure(local and global; repeated compare-mode runs)just checkjust lintjust testgit diff --checkStack: 2 of 2. Depends on #2172.