We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51ec382 commit e2d0ac4Copy full SHA for e2d0ac4
crates/libs/kill_tree/src/macos.rs
@@ -28,10 +28,17 @@ pub(crate) async fn get_process_info(process_id: ProcessId) -> Option<ProcessInf
28
}
29
};
30
let mut proc_bsdinfo = unsafe { std::mem::zeroed::<libproc::proc_bsdinfo>() };
31
+ let proc_pidtbsdinfo_sign = match i32::try_from(libproc::PROC_PIDTBSDINFO) {
32
+ Ok(x) => x,
33
+ Err(e) => {
34
+ debug!(error = ?e, "failed to convert PROC_PIDTBSDINFO");
35
+ return None;
36
+ }
37
+ };
38
let result = unsafe {
39
libproc::proc_pidinfo(
40
process_id as i32,
- libproc::PROC_PIDTBSDINFO as i32,
41
+ proc_pidtbsdinfo_sign,
42
0,
43
std::ptr::addr_of_mut!(proc_bsdinfo).cast::<c_void>(),
44
proc_bsdinfo_size_sign,
0 commit comments