diff --git a/src/proc.rs b/src/proc.rs index 86282f6..db7e8f1 100644 --- a/src/proc.rs +++ b/src/proc.rs @@ -12,7 +12,6 @@ use std::{io, thread}; use ipc_channel::ipc::{self, IpcOneShotServer, IpcReceiver, IpcSender}; use serde::{de::DeserializeOwned, Serialize}; -use windows_sys::Win32::System::Threading::{OpenProcess, TerminateProcess, PROCESS_ALL_ACCESS}; use crate::core::{assert_spawn_okay, should_pass_args, MarshalledCall, ENV_NAME}; use crate::error::{PanicInfo, SpawnError}; @@ -339,8 +338,10 @@ impl ProcessHandleState { } #[cfg(windows)] { - let proc = OpenProcess(PROCESS_ALL_ACCESS, 0, pid as _); - TerminateProcess(proc, 1); + use windows_sys::Win32::System::Threading; + let proc = + Threading::OpenProcess(Threading::PROCESS_ALL_ACCESS, 0, pid as _); + Threading::TerminateProcess(proc, 1); } } }