Repository navigation
fix(interpreter): process substitution expands to /dev/fd/63 - #2639
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 5bf22c9 | Commit Preview URL Branch Preview URL |
Oct 08 2026, 10:51 AM |
`<(cmd)` / `>(cmd)` now expand to bash's `/dev/fd/63`, `/dev/fd/62`, ... per command, skipping fds still open and reusing 63 once the command (or the compound command that opened it) finishes. The data lives in a per-interpreter fd namespace: `ProcSubFs` wraps each shell's VFS view and answers `/dev/fd/N` (N >= 3) itself, never forwarding such a path to the shared filesystem, so tenants on one VFS each get their own `/dev/fd/63` (TM-ISO-028). Replaces the `/dev/fd/proc_sub_<n>` VFS files and the global counter. `set -C` no longer refuses `> >(cmd)`. Bash-oracle floor raised to 103 101.
chaliy
force-pushed
the
claude/procsub-devfd
branch
from
October 8, 2026 10:50
41d7762 to
5bf22c9
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.
Requested by Михайло · project thread
What changed
<(cmd)/>(cmd)expand to bash's/dev/fd/63,/dev/fd/62, ... (highest free fd counting down from 63, skipping fds already open), restarting per command like bash.ProcSubFs, a wrapper over the interpreter's view of the filesystem)./dev/fd/N(N ≥ 3) is never passed to the shared VFS, so interpreters sharing one filesystem each have their own/dev/fd/63(new TM-ISO-028).stats as a FIFO, and is gone after its command (cat /dev/fd/63→ No such file or directory).PROC_SUB_COUNTERand the/dev/fd/proc_sub_<n>files written into the VFS.set -Cno longer refuses> >(cmd);exec 3> >(cmd)no longer aborts the script on later writes.Why
Level-up roadmap, rootfs/OS-shape step: closes the
process-substitution-dev-fdbash-oracle gap while keeping tenants isolated in one process.Before / After (verified)
bash-oracle: match 103 → 104, strict 101 → 102 / 106 (rebased on #2638;
floor.txtraised to104 102). With a coproc open,<(true)skips its fds like bash:63 60 /dev/fd/62./dev/fd/proc_sub_0 /dev/fd/proc_sub_1 /dev/fd/proc_sub_2/dev/fd/63 /dev/fd/62 /dev/fd/61The
diffoutput,rc=1, andcat: /dev/fd/63: No such file or directory/rc=1are identical between bash and this branch.Risk
/dev/fdpath reaching the shared FS; a second interpreter on the same FS can't read, see or write the first's/dev/fd/63; 4 parallel interpreters each read only their own data.max_file_descriptors. Stack fordepth_32_no_stack_overflowis slightly below main.x<(true)); data is buffered, not a live pipe;exec 3> >(cmd)drops fd 3 writes.Checklist
process_substitution_fd_tests.rs, 14 tests; two bashbox spec cases enabled), verified against bash 5.2Generated by Claude Code