Tracking Issue for Windows' `CommandExt::inherit_handles`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(windows_process_extensions_inherit_handles)]
This is a tracking issue for a new inherit_handles builder method of the Windows-specific CommandExt extension trait.
In short, it will add the ability to configure the bInheritHandles parameter of the CreateProcessW function used in order to perform the process spawns under Windows. Indeed, it is currently always set to TRUE while all the other parameters already are customizable at least in part. However, under certain circumstances such as when spawning a process with a pseudoconsole attached or when spawning non-PPL processes from a PPL one, either the intended behavior will not work or simply the function call will directly fail. The proposed API will therefore enable one to use the standard process::Command and its Windows extension trait in a fashion compatible with these use cases.
Public API
// std::os::windows::process
pub trait CommandExt: Sealed {
fn inherit_handles(&mut self, inherit_handles: bool) -> &mut process::Command;
}
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
- ACP: rust-lang/libs-team#264
- Implementation: #115501
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- None yet.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The implementation is marked complete in #115501; start by reviewing that PR and the Windows process entry point in library/std/src/sys/process/windows.rs, along with the std::os::windows::process::CommandExt API. Check the feature lifecycle guidance for the remaining FCP and stabilization steps. Done means the final comment period and stabilization PR are completed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100