Repository navigation
Document defaults for stdin, stdout, and stderr methods of Command - #45151
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BurntSushi (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
frewsxcv
left a comment
There was a problem hiding this comment.
looks good! just a couple small comments
| /// Defaults to [`inherit`] when used with `spawn` or `status`, and | ||
| /// defaults to [`piped`] when used with `output`. | ||
| /// | ||
| /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is |
There was a problem hiding this comment.
can you put the windows-specific lines below a 'Platform-specific behavior' header like we do here?
| /// defaults to [`piped`] when used with `output`. | ||
| /// | ||
| /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is | ||
| /// set, no stdin is connected unless explicitly assigned. |
There was a problem hiding this comment.
out of curiosity, what do you mean by 'assigned' here? i'm guessing that's some windows-specific concept i'm not familiar with
|
It seems I was misunderstanding the Windows-specific behaviour there - it's only relevant when the child process uses the Windows subsystem, not the parent process. (This comes from the comment on #29370 by @retep998 who can maybe give more insight?) I've removed the comments about it in the above commit. I did some testing and it doesn't look like the child's subsystem affects the defaults of the I still don't fully understand this, but it seems like it should be documented on |
|
r? @frewsxcv How's this looking, Corey? It looks like your concerns were addressed? |
|
i'm not familiar at all with the windows subsystem details regarding this, so i can't be much help there. but this pr looks great, thanks for your contribution! @bors r+ rollup |
|
📌 Commit 210c911 has been approved by |
Document defaults for stdin, stdout, and stderr methods of Command For rust-lang#29370
For #29370