diff options
| author | unknown <abramlujan@gmail.com> | 2022-05-10 02:41:19 -0300 |
|---|---|---|
| committer | unknown <abramlujan@gmail.com> | 2022-05-10 02:41:19 -0300 |
| commit | 5368ea7d2eae4e86c1c7a68197506d062bc1689d (patch) | |
| tree | 57e63729d7bae198d015857768da064b886364e4 /library/std/src/os | |
| parent | 0dd7e10282aaa7a3e1f5660f8bb043ee4ea07355 (diff) | |
| download | rust-5368ea7d2eae4e86c1c7a68197506d062bc1689d.tar.gz rust-5368ea7d2eae4e86c1c7a68197506d062bc1689d.zip | |
Expose process main_thread_handle on Windows
Diffstat (limited to 'library/std/src/os')
| -rw-r--r-- | library/std/src/os/windows/process.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/library/std/src/os/windows/process.rs b/library/std/src/os/windows/process.rs index e1896309914..1c7e361c2a4 100644 --- a/library/std/src/os/windows/process.rs +++ b/library/std/src/os/windows/process.rs @@ -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() + } +} |
