-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! just a couple small comments
src/libstd/process.rs
Outdated
/// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you put the windows-specific lines below a 'Platform-specific behavior' header like we do here?
src/libstd/process.rs
Outdated
/// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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