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 0cfd142 commit 0e72f68Copy full SHA for 0e72f68
crates/libs/kill_tree/src/macos.rs
@@ -20,14 +20,21 @@ pub(crate) async fn get_process_info(process_id: ProcessId) -> Option<ProcessInf
20
return None;
21
}
22
};
23
+ let proc_bsdinfo_size_sign = match i32::try_from(proc_bsdinfo_size) {
24
+ Ok(x) => x,
25
+ Err(e) => {
26
+ debug!(error = ?e, "failed to convert size of proc_bsdinfo");
27
+ return None;
28
+ }
29
+ };
30
let mut proc_bsdinfo = unsafe { std::mem::zeroed::<libproc::proc_bsdinfo>() };
31
let result = unsafe {
32
libproc::proc_pidinfo(
33
process_id as i32,
34
libproc::PROC_PIDTBSDINFO as i32,
35
0,
36
&mut proc_bsdinfo as *mut _ as *mut c_void,
- proc_bsdinfo_size as i32,
37
+ proc_bsdinfo_size_sign,
38
)
39
40
if result <= 0 {
0 commit comments