You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/dev/fd/N 打开普通文件应 fresh open(偏移 0),现 alias 层全域 dup 共享偏移 #2256
Closed by PR #2275 (merge commit 01ecad1b191cd09e0749baef4e44bdad25a23d3c), two waves:
Wave 1 (bc237c5): /dev/fd/N opens of regular files now fresh-open instead of alias-dup'ing the shared offset, across the redirect / operand / builtin faces routed through FileFd::reopens_fresh / fd_alias_reopen_path.
Wave 2 (26c3fea): the eight never-covered faces found at wave-1 harvest (noclobber+truncate via the ordered walk's resolver gate, builtin flush fresh-open, read spelling-vs-dup split, resolver-first source face, fd-0 operand fresh for regular-file stdin, own-input binding fresh FileFd).
Verification: CI 11/11 green on the composed head 0d253a5a on the merged head; collector's scrubbed-fd batch on the composed tree — issue2256 pins 25/25, issue2249 pins 9/9, controls issue1963 6/6, issue2235 11/11, issue2238 8/8, issue2265 11/11. Every pin oracle-checked against GNU bash 5.3.20; no pin was modified in either wave.
Note: wave 2 also fixes a pre-existing master defect in stdin_string_for_command (a function's cat <&0 stole the caller's pipeline spool despite the <> rebind) through the same File-endpoint guard as function_stdin_is_command_source — master's red issue2249 interaction pin turns green with this merge. #2249 itself stays closed; this is recorded here because the fix rode this PR.
Residuals dispositioned (NOT part of this closure):
Wave-1 Discovery ② — pipeline-stage fd-0 alias binds still dup for spelling targets. Deliberately untouched here: the resolver is ready, but the stage faces belong with the reopened 管道 stage 自身重定向不被应用(cat 3<seed <&3 | wc -c 输出 0) #2255 stage work (§8 ≥3-stage stage-0 delivery) in the fd audit ledger.
Split-endpoint corner and the Windows fd-0 operand-drain observations from the wave-2 report — audit ledger, no reproducer elevates them to a filing.
Activity
Merge pull request #2275 from unixwin/fix/2256-devfd-fresh
caomengxuan666 commentedon Oct 30, 2026
Closed by PR #2275 (merge commit
01ecad1b191cd09e0749baef4e44bdad25a23d3c), two waves:/dev/fd/Nopens of regular files now fresh-open instead of alias-dup'ing the shared offset, across the redirect / operand / builtin faces routed throughFileFd::reopens_fresh/fd_alias_reopen_path.readspelling-vs-dup split, resolver-first source face, fd-0 operand fresh for regular-file stdin, own-input binding fresh FileFd).Verification: CI
11/11 green on the composed head 0d253a5aon the merged head; collector's scrubbed-fd batch on the composed tree — issue2256 pins25/25, issue2249 pins9/9, controls issue1963 6/6, issue2235 11/11, issue2238 8/8, issue2265 11/11. Every pin oracle-checked against GNU bash 5.3.20; no pin was modified in either wave.Note: wave 2 also fixes a pre-existing master defect in
stdin_string_for_command(a function'scat <&0stole the caller's pipeline spool despite the<>rebind) through the same File-endpoint guard asfunction_stdin_is_command_source— master's red issue2249 interaction pin turns green with this merge. #2249 itself stays closed; this is recorded here because the fix rode this PR.Residuals dispositioned (NOT part of this closure):
exec 6<seed; /bin/echo X > /dev/fd/6) is filed separately as 外部命令 stdio 计划对只读别名输出误服(/bin/echo X > /dev/fd/6 写穿到真实 stdout) #2285 — that is the external face only; the in-process faces are fixed here.fix(executor): /dev/fd/N alias open of a regular file re-opens fresh