Windows compilation fixes
This commit is contained in:
parent
6523f6edf5
commit
707fa2e952
|
@ -46,7 +46,7 @@ pub fn install_handler<F>(handler: F)
|
||||||
where F: Fn() + 'static + Send + Sync {
|
where F: Fn() + 'static + Send + Sync {
|
||||||
|
|
||||||
use kernel32::SetConsoleCtrlHandler;
|
use kernel32::SetConsoleCtrlHandler;
|
||||||
use winapi::{BOOL, DWORD, FALSE};
|
use winapi::{BOOL, DWORD, FALSE, TRUE};
|
||||||
|
|
||||||
pub unsafe extern "system" fn ctrl_handler(_: DWORD) -> BOOL {
|
pub unsafe extern "system" fn ctrl_handler(_: DWORD) -> BOOL {
|
||||||
invoke();
|
invoke();
|
||||||
|
|
|
@ -135,7 +135,7 @@ mod imp {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for Process {
|
impl Drop for Process {
|
||||||
fn drop(&self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let _ = CloseHandle(self.job);
|
let _ = CloseHandle(self.job);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue