-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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: Ability to stop child process from Inheriting Handles libs-team#264
- Implementation: Add new inherit_handles flag to CommandExt trait #115501
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.