Skip to content

Commit

Permalink
Try using windows instead of windows-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
davoclavo committed Jan 12, 2024
1 parent 4100598 commit dbf9758
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ unicode-width = "0.1.0"
uuid = { version = "1.0.0", features = ["v4"] }

[target.'cfg(windows)'.dependencies]
windows-sys = {version = "0.52.0", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_System_Console"] }
windows = {version = "0.52.0", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_System_Console"] }

[dev-dependencies]
cradle = "0.2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/signal_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl SignalHandler {

#[cfg(windows)]
unsafe {
windows_sys::Win32::System::Console::GenerateConsoleCtrlEvent(signal as u32, child_pid);
windows::Win32::System::Console::GenerateConsoleCtrlEvent(signal as u32, child_pid);
}
}
match child.try_wait() {
Expand Down
2 changes: 1 addition & 1 deletion tests/signals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn send_signal(process_id: u32, signal: i32) {
}
#[cfg(windows)]
unsafe {
let res = windows_sys::Win32::System::Console::GenerateConsoleCtrlEvent(
let res = windows::Win32::System::Console::GenerateConsoleCtrlEvent(
signal as u32,
process_id as u32,
);
Expand Down

0 comments on commit dbf9758

Please sign in to comment.