-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
std: merge definitions of StdioPipes
#146639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
|
r=me with rebase |
All platforms define this structure the same way, so we can just put it in the `process` module directly.
189007f to
87a00f6
Compare
|
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. |
|
@bors r+ |
…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.
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
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.
…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.
…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
…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.
…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.
…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.
All platforms define this structure the same way, so we can just put it in the
processmodule directly.