Windows: CommandExt::async_pipes#97149
Conversation
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
|
r? rust-lang/libs-api |
|
Seems okay to me. @m-ou-se could you take a look since you requested this API in tokio-rs/tokio#4670 (comment)? r? m-ou-se |
m-ou-se
left a comment
There was a problem hiding this comment.
Looks good to me. r=me after minor changes.
0313a3b to
f1f614c
Compare
|
@bors r=m-ou-se rollup |
|
📌 Commit f1f614cd5ce8364d1fc5da103553a9c262c1d60f has been approved by |
|
@bors r- Oops, forgot to post the tracking issue for this one. I really shouldn't try to do two things at once. 🙂 |
f1f614c to
740a54c
Compare
|
@bors r=m-ou-se rollup |
|
📌 Commit 740a54c has been approved by |
…ou-se `Stdio::makes_pipe` Wrappers around `std::process::Command` may want to be able to override pipe creation. However, [`std::process::Stdio`](https://doc.rust-lang.org/std/process/struct.Stdio.html) is opaque so there's no way to tell if `Command` was told to create new pipes or not. This is in some ways a more generic (and cross-platform) alternative to rust-lang#97149. However, unlike that feature, this comes with the price of the user needing to actually create their own pipes rather than reusing the std one. So I think it stands (or not) on its own. # Example ```rust #![feature(stdio_makes_pipe)] use std::process::Stdio; let io = Stdio::piped(); assert_eq!(io.makes_pipe(), true); ```
Rollup of 8 pull requests Successful merges: - rust-lang#93080 (Implement `core::slice::IterMut::as_mut_slice` and `impl<T> AsMut<[T]> for IterMut<'_, T>`) - rust-lang#94855 (Panic when advance_slices()'ing too far and update docs.) - rust-lang#96609 (Add `{Arc, Rc}::downcast_unchecked`) - rust-lang#96719 (Fix the generator example for `pin!()`) - rust-lang#97149 (Windows: `CommandExt::async_pipes`) - rust-lang#97150 (`Stdio::makes_pipe`) - rust-lang#97837 (Document Rust's stance on `/proc/self/mem`) - rust-lang#98159 (Include ForeignItem when visiting types for WF check) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Discussed in tokio-rs/tokio#4670 was the need for third party crates to be able to force
process::Command::spawnto create pipes as async.This implements the suggestion for a
async_pipesmethod that gives third party crates that option.Example: