Skip to content

Commit 3d880ab

Browse files
committed
Migrate from winapi to windows_sys fix
1 parent 120f608 commit 3d880ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/native/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub(crate) fn kill_process(id: u32) -> Result<(), KillFailedError> {
1111

1212
unsafe {
1313
let handle = OpenProcess(PROCESS_TERMINATE, 0, id);
14-
if handle == 0 {
14+
if handle == 0 || handle == -1 {
1515
return error;
1616
}
1717
if TerminateProcess(handle, 101) == 0 {

0 commit comments

Comments
 (0)