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] Process substitution path form is a Windows temp file, not /dev/fd/N: 'case <(echo c) in /dev/fd/*' fails (GNU: matches) #355
GNU 5.3.0: fdpath (procsub words expand to /dev/fd/N on Linux).
rubash: other — the procsub word is a temp file like /c/Users/.../Temp/rubash-process-subst-<pid>-<counter>.tmp, so every script that pattern-matches /dev/fd/* on a procsub result (a common Linux idiom) takes the wrong branch. The temp path also leaks into stdout when echoed (p022), with a nondeterministic pid component.
Class: platform adaptation divergence with script-visible semantics (GNU scripts written against /dev/fd see a different word). If a real /dev/fd emulation is not feasible, an explicit decision should be recorded; filing so the /dev/fd/* contract is tracked.
GNU C owner: subst.c:6362 process_substitute() — the word is produced as /dev/fd/N (or /dev/stdin variants) via the fd the child reads.
Artifacts: target/issue-suites/results/gnusweep3/cat3/case/p011.* / p022.; minimal target/issue-suites/results/gnusweep3/probes/min/m23-procsub-pathform.
Fixed by wt21/resid21 (409ce3ce + captain followup d5d6642, master): the fd-indirection layer is implemented — register_process_substitution_fd opens the highest free fd below 64 (GNU move_to_high_fd parity: first word 63, second 62, echo output byte-identical), carries the payload as FdReadEndpoint::ProcessSubstitution, and the four word-materialization points emit /dev/fd/N; output >(cmd) substitutions get FdWriteEndpoint routing. Consumers reuse the existing mechanisms (argv via materialize_dev_fd_operands, redirects via the dev-fd open paths, plus a new output-target route). 10-form matrix byte-identical; procsub/redir02/substr/ksh/libc 0 diff. The captain followup fixed the one gap the lane slice missed: $(< /dev/fd/N) cat-file now reads the fd-table endpoint (input_snapshot_bytes) instead of fs::read_to_string on the virtual path (caught by the regression golden, fixed in d5d6642). Documented platform residuals: external children printing their own argv filename see the materialized temp path; GNU closes procsub fds at the command boundary (execute_cmd.c:460-466) where we keep them resolvable (superset).
Activity
gnusweep3: GNU-syntax deep-water wave 3 — orphan-sub harvest + 8 cons…
fix(#339,#340): procsub parse admission + dup-word ambiguous redirect
fix(#355): procsub words use the GNU /dev/fd/N form via a virtual-fd …
fix(#355 followup): cat-file $(< /dev/fd/N) reads the fd-table endpoint
caomengxuan666 commentedon Sep 30, 2026
Fixed by wt21/resid21 (409ce3ce + captain followup d5d6642, master): the fd-indirection layer is implemented — register_process_substitution_fd opens the highest free fd below 64 (GNU move_to_high_fd parity: first word 63, second 62, echo output byte-identical), carries the payload as FdReadEndpoint::ProcessSubstitution, and the four word-materialization points emit /dev/fd/N; output >(cmd) substitutions get FdWriteEndpoint routing. Consumers reuse the existing mechanisms (argv via materialize_dev_fd_operands, redirects via the dev-fd open paths, plus a new output-target route). 10-form matrix byte-identical; procsub/redir02/substr/ksh/libc 0 diff. The captain followup fixed the one gap the lane slice missed: $(< /dev/fd/N) cat-file now reads the fd-table endpoint (input_snapshot_bytes) instead of fs::read_to_string on the virtual path (caught by the regression golden, fixed in d5d6642). Documented platform residuals: external children printing their own argv filename see the materialized temp path; GNU closes procsub fds at the command boundary (execute_cmd.c:460-466) where we keep them resolvable (superset).
lexer: join lines while a word-attached procsub body is open (#463) (#…