Skip to content

Commit

Permalink
Fix conditional compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Aug 6, 2024
1 parent c35d8f8 commit bacfa68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit bacfa68

Please sign in to comment.