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.)
Unresolved Questions
Feature gate:
#![feature(windows_process_extensions_inherit_handles)]This is a tracking issue for a new
inherit_handlesbuilder method of the Windows-specificCommandExtextension trait.In short, it will add the ability to configure the
bInheritHandlesparameter of theCreateProcessWfunction used in order to perform the process spawns under Windows. Indeed, it is currently always set toTRUEwhile all the other parameters already are customizable at least in part. However, under certain circumstances such as when spawning a process with apseudoconsoleattached 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 standardprocess::Commandand its Windows extension trait in a fashion compatible with these use cases.Public API
Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩