Skip to content

coproc: body stdout leaks one blank line to the real stdout (GNU discards it) #387

Closed

Description

@caomengxuan666

Found during wt33 triage of #373. Real semantic gap (minor).

Repro (script file, both shells)

target/issue-suites/results/wt33-373/cases/B09_coproc_leak.sh:

coproc GREP { echo co-value; }
echo "pid:${GREP_PID:+set}"

WSL GNU Bash 5.3.0:

pid:set
rc 0 (the body's stdout goes to the coproc pipe; nothing surfaces)

rubash:

pid:set
<one extra blank line>
rc 0

Notes

  • Raw artifacts: target/issue-suites/results/wt33-373/run/B09_coproc_leak.*, A28_coproc_words.*.
  • Looks like the coproc body's output pipe is not fully detached on Windows — one empty write/flush reaches the console stdout.
  • tests/parser_tests.rs coproc word-metadata test was updated to carrier form; this execution leak is tracked here.

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 on master (wt37/gapfix1 batch, CI green on bbccb1c): see the issue-suite tests/issue387_*_regressions.rs and the lane's two-shell matrices on the ticket trail. Master carries the fix; suites green.

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