-
Notifications
You must be signed in to change notification settings - Fork 13.8k
std: reorganize pipe implementations #146794
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
base: master
Are you sure you want to change the base?
Conversation
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
This comment has been minimized.
This comment has been minimized.
f2296a2
to
73ca518
Compare
This comment has been minimized.
This comment has been minimized.
I opened these two PRs before I noticed your PR here, which is a superset, modulo some tiny fixes for tier 3 builds in mine. Sorry. My PRs probably create more work for you, so feel free to close them. But if they'd help to split yours for review, they might be useful. |
This comment has been minimized.
This comment has been minimized.
49a659a
to
8603acf
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The Miri subtree was changed cc @rust-lang/miri |
Sorry for those test failures, I'll adjust this a bit on the Miri side to hopefully make it more resilient without being terribly slow. |
☔ The latest upstream changes (presumably #146931) made this pull request unmergeable. Please resolve the merge conflicts. |
6f3639f
to
ae569fe
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. |
Currently, there are two distinct types called
AnonPipe
instd
:io::pipe
(insys::anonymous_pipe
)Stdin
/Stdout
/Stderr
(insys::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 supportread2
, whereas thesys::anonymous_pipe
version does not do so. Thus the naming is extremely confusing.To fix this, this PR renames the
sys::anonymous_pipe
version ofAnonPipe
to simplyPipe
, whereas thesys::pal::pipe
version is now calledChildPipe
. Additionally,sys::anonymous_pipe
is now also just calledsys::pipe
.sys::pal::pipe
has been moved tosys::process
and is now calledsys::process::child_pipe
.sys::pipe
andChildPipe
is defined as a type alias toPipe
withinsys::process
.And lastly, the
read2
function (originally insys::pal::pipe
) is now calledread_output
and defined bysys::process
, as (at least on Windows) it is only usable withChildPipe
.Includes #146639 for convenience.