Skip to content

Conversation

@joboet
Copy link
Member

@joboet joboet commented Sep 16, 2025

All platforms define this structure the same way, so we can just put it in the process module directly.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 16, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Mark-Simulacrum
Copy link
Member

r=me with rebase

All platforms define this structure the same way, so we can just put it in the `process` module directly.
@rustbot
Copy link
Collaborator

rustbot commented Sep 21, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 21, 2025

📌 Commit 87a00f6 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 21, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 21, 2025
…imulacrum

std: merge definitions of `StdioPipes`

All platforms define this structure the same way, so we can just put it in the `process` module directly.
bors added a commit that referenced this pull request Sep 21, 2025
Rollup of 4 pull requests

Successful merges:

 - #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - #146486 (Improve `core::sync::atomic` coverage)
 - #146606 (ci: x86_64-gnu-tools: Add `--test-args` regression test)
 - #146639 (std: merge definitions of `StdioPipes`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit adfc111 into rust-lang:master Sep 21, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Sep 21, 2025
Rollup merge of #146639 - joboet:shared-stdiopipes, r=Mark-Simulacrum

std: merge definitions of `StdioPipes`

All platforms define this structure the same way, so we can just put it in the `process` module directly.
@rustbot rustbot added this to the 1.92.0 milestone Sep 21, 2025
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Sep 24, 2025
…imulacrum

std: merge definitions of `StdioPipes`

All platforms define this structure the same way, so we can just put it in the `process` module directly.
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Sep 24, 2025
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - rust-lang#146486 (Improve `core::sync::atomic` coverage)
 - rust-lang#146606 (ci: x86_64-gnu-tools: Add `--test-args` regression test)
 - rust-lang#146639 (std: merge definitions of `StdioPipes`)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 9, 2025
…imulacrum

std: merge definitions of `StdioPipes`

All platforms define this structure the same way, so we can just put it in the `process` module directly.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2025
…ulacrum

std: reorganize pipe implementations

Currently, there are two distinct types called `AnonPipe` in `std`:
* The one used to implement `io::pipe` (in `sys::anonymous_pipe`)
* The one used to implement `Stdin`/`Stdout`/`Stderr` (in `sys::pal::pipe`)

On Windows, these actually have different semantics, as one of the handles returned by the `sys::pal::pipe` version is opened for asynchronous operation in order to support `read2`, whereas the `sys::anonymous_pipe` version does not do so. Thus the naming is extremely confusing.

To fix this, this PR renames the `sys::anonymous_pipe` version of `AnonPipe` to simply `Pipe`, whereas the `sys::pal::pipe` version is now called `ChildPipe`. Additionally,
* `sys::anonymous_pipe` is now also just called `sys::pipe`.
* On Windows, `sys::pal::pipe` has been moved to `sys::process` and is now called `sys::process::child_pipe`.
* On non-Windows platforms, pipe creation is now exclusively handled by `sys::pipe` and `ChildPipe` is defined as a type alias to `Pipe` within `sys::process`.

And lastly, the `read2` function (originally in `sys::pal::pipe`) is now called `read_output` and defined by `sys::process`, as (at least on Windows) it is only usable with `ChildPipe`.

Includes rust-lang#146639 for convenience.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2025
…ulacrum

std: reorganize pipe implementations

Currently, there are two distinct types called `AnonPipe` in `std`:
* The one used to implement `io::pipe` (in `sys::anonymous_pipe`)
* The one used to implement `Stdin`/`Stdout`/`Stderr` (in `sys::pal::pipe`)

On Windows, these actually have different semantics, as one of the handles returned by the `sys::pal::pipe` version is opened for asynchronous operation in order to support `read2`, whereas the `sys::anonymous_pipe` version does not do so. Thus the naming is extremely confusing.

To fix this, this PR renames the `sys::anonymous_pipe` version of `AnonPipe` to simply `Pipe`, whereas the `sys::pal::pipe` version is now called `ChildPipe`. Additionally,
* `sys::anonymous_pipe` is now also just called `sys::pipe`.
* On Windows, `sys::pal::pipe` has been moved to `sys::process` and is now called `sys::process::child_pipe`.
* On non-Windows platforms, pipe creation is now exclusively handled by `sys::pipe` and `ChildPipe` is defined as a type alias to `Pipe` within `sys::process`.

And lastly, the `read2` function (originally in `sys::pal::pipe`) is now called `read_output` and defined by `sys::process`, as (at least on Windows) it is only usable with `ChildPipe`.

Includes rust-lang#146639 for convenience.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants