Skip to content

[bug] pipeline stage stderr bypasses the fd table on the Windows concurrent path (Windows face of #3308) #3402

Closed

Description

@caomengxuan666

[bug] pipeline stage stderr bypasses the fd table on the Windows concurrent path (Windows face of #3308)

Context

PR #3367's sibling fix in PR #3364 routed pipeline-stage stderr through the fd table for the unix concurrent pipeline paths, so in script-mode command substitution the first stage's stderr now honours the ambient redirections (the #3308 defect). The captain review of PR #3364 (dossier §2/§6/§7 in the captain's workspace, ~/workspace/review-3364/CAPTAIN-VERIFY.md) confirmed one raw write remains on the Windows side.

Defect

In src/executor/pipeline_exec.rs (~:2429), inside the #[cfg(windows)] execute_external_pipeline_concurrently, stage stderr is still written via a raw std::io::stderr().write_all, bypassing the fd table — the same bypass class PR #3364 removed on the unix twins. The Windows prefix/concurrent twins should be audited in the same pass for any other raw-stderr writes that skip the fd-table routing (write_default_stderr / the ConcurrentPipelineStderr plan).

Verification shape

Not reproducible on Linux. The regression pin must be exercised by the Windows CI leg: script-mode x=$(external | external) with the first stage failing, under each ambient stderr binding (inherit / redirect to file / 2>&1 / 2>&-), asserting the error lands where GNU bash on Windows (Git Bash) puts it. The unix-side pin tests/issue3308_comsub_pipeline_stderr_redirects.rs (18 cells) is the shape reference.

Rules

Pinned issue #3341 applies: GNU source first, fix by mechanism, regression pin with fail-first proof on the Windows leg, draft PR at first commit, no self-merge / self-close.

Activity

  1. added this to the 1.5.1 milestone on Nov 11, 2026
  2. added
    bug
    gnu-baseline
    P3-low
    area:fd
    on Nov 11, 2026
  3. caomengxuan666 commented on Nov 14, 2026

    @caomengxuan666
    MemberAuthor

    队长车道开工(lane L08,分支 fix/3402-pipeline-stage-stderr-fd-table)。

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

Metadata

Metadata

Assignees

Labels

P3-lowarea:fdbuggnu-baseline

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions