Expose process main_thread_handle on Windows
This commit is contained in:
parent
0dd7e10282
commit
5368ea7d2e
3 changed files with 52 additions and 7 deletions
|
@ -180,3 +180,17 @@ impl CommandExt for process::Command {
|
|||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "windows_process_extensions_main_thread_handle", issue = "96723")]
|
||||
pub trait ChildExt: Sealed {
|
||||
/// Extracts the main thread raw handle, without taking ownership
|
||||
#[unstable(feature = "windows_process_extensions_main_thread_handle", issue = "96723")]
|
||||
fn main_thread_handle(&self) -> BorrowedHandle<'_>;
|
||||
}
|
||||
|
||||
#[unstable(feature = "windows_process_extensions_main_thread_handle", issue = "96723")]
|
||||
impl ChildExt for process::Child {
|
||||
fn main_thread_handle(&self) -> BorrowedHandle<'_> {
|
||||
self.handle.main_thread_handle()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue