Skip to content

combined >(cmd > file) redirect on compound commands fails with Invalid argument (brace/case/for/if/select/subshell/while/time bodies, 12 tests) #394

Closed

Description

@caomengxuan666

Found during wt33 triage of #374 (executor_tests part_080 family).

Repro (script files, both shells)

Representative probe: target/issue-suites/results/wt33-373/run/K065_test_brace_group_combined_process_substitution_captures_whole_body.*

{ echo out; } > >(cat > gout.txt)

WSL GNU Bash 5.3.0: runs, gout.txt receives out, rc 1 for the gnu scratch context (see .gnu.rc files; several variants rc 1).
rubash: bash: line 1: >(cat > gout.txt): >(cat > gout.txt): Invalid argument, body output lost.

Same shape fails for case/for/if/select/subshell/while/time compound bodies and the append (>>& variants — probes K064-K083:
K064, K065, K066, K069, K070, K078, K079, K080, K081, K083.
NOTE: a few of those K extracts were mechanically produced; re-verify each before fixing (two K extracts had corrupted literals — see the wt33 lane notes).

Raw artifacts

target/issue-suites/results/wt33-373/run/K06*..K08* (.gnu/.rub stdout/stderr/rc pairs), runner target/issue-suites/results/wt33-373/run_cases.sh.

Tests left red in executor_tests part_080 (this family): test_brace_group_combined_process_substitution_captures_whole_body, test_case_combined_append, test_for/if/select/subshell/while/time_combined_*_captures_body.

Activity

  1. added
    bug
    on Oct 2, 2026
  2. added 2 commits that reference this issue on Oct 2, 2026
  3. caomengxuan666 commented on Oct 2, 2026

    @caomengxuan666
    MemberAuthor

    Landed as ef3e84f: compound &>/&>>/2> process-substitution targets bind to their fd-table carrier instead of hitting the Windows filesystem. 4/4 suite; fresh two-shell probes byte-identical (rc 0/0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions