We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GetProcessId
1 parent 183f7c8 commit af7fda5Copy full SHA for af7fda5
library/std/src/sys/pal/windows/process.rs
@@ -390,6 +390,7 @@ impl Command {
390
Process {
391
handle: Handle::from_raw_handle(pi.hProcess),
392
main_thread_handle: Handle::from_raw_handle(pi.hThread),
393
+ id: pi.dwProcessId,
394
},
395
pipes,
396
))
@@ -652,6 +653,7 @@ impl From<io::Stderr> for Stdio {
652
653
pub struct Process {
654
handle: Handle,
655
main_thread_handle: Handle,
656
+ id: u32,
657
}
658
659
impl Process {
@@ -670,7 +672,7 @@ impl Process {
670
672
671
673
674
pub fn id(&self) -> u32 {
- unsafe { c::GetProcessId(self.handle.as_raw_handle()) }
675
+ self.id
676
677
678
pub fn main_thread_handle(&self) -> BorrowedHandle<'_> {
0 commit comments