1
Fork 0

Expose process main_thread_handle on Windows

This commit is contained in:
unknown 2022-05-10 02:41:19 -03:00
parent 0dd7e10282
commit 5368ea7d2e
3 changed files with 52 additions and 7 deletions

View file

@ -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()
}
}