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
[bug] exec with a command treats >&fd / >&- as output to a file named fd / - #2803
A file literally named 2 is created containing hi; nothing reaches stderr. Likewise exec echo hi >&- creates a file literally named - instead of closing stdout for the command, and exec echo hi >&1 / exec echo hi 2>err.txt >&- style fd-duplication/close forms show the same file-creation direction (morph forms mB10/mB12/mB14/mB18/mB19/mB20 all DIFF).
Boundary (both shells agree)
Bare exec (no command) with >&fd / >&-, the command builtin with the same redirections, >&- / &>- outside exec, ordinary > file redirection, and <&- all behave per GNU. The breakage is specific to exec-with-a-command plus fd-duplication/close redirections.
Regression seed:
exececho hi >&2# GNU: hi on stderr, no file created. rubash (pre-fix): file named '2' created, hi in the file.# Assertable form: run in an empty dir, then check no file named '2' exists and stderr got 'hi'.
Found by diff-hunt round r64 (glob/case + procsub/coproc), verdict on a fresh master build, two passes byte-identical. Dedup: no open/closed exec-redirection issue covers fd-duplication-as-filename under exec-with-command (#1413 is exec persistent stdin redirections, #1687 is numbered fds for bare builtins — different mechanisms).
Activity
test(exec): pin exec dup/close redirect classification (Refs #2803)
fix(exec): walk the whole redirect list for the exec-with-command spawn
Merge remote-tracking branch 'origin/master' into fix/F2-wave1
F2: exec ordered redirect walk, fd-limit gate, stage stderr routing (…
caomengxuan666 commentedon Nov 10, 2026
由 PR #3144 合入关闭(squash d4f7d94,2026-11-10T07:36:19Z)。队长复核 PASS(卷宗 review-3144/):九文件 +1422/−268,冲突消解合并经四核(无冲突标记/master 功能在位/删除意图未复活/无改动被吞),四单钉头复跑 37/37(2395 7/7、2635 12/12、2803 6/6、2821 12/12),lib 双边 1207/0/4 同数、-D warnings 干净,合入头 CI 10 过 1 跳零红。