This commit is contained in:
ClementTsang 2025-02-28 03:21:37 -05:00
parent b1f969880e
commit db214a73c1
No known key found for this signature in database
GPG Key ID: DC3B7867D8D97095

View File

@ -59,8 +59,7 @@ pub fn kill_process_given_pid(pid: Pid) -> anyhow::Result<()> {
/// Kills a process, given a PID, for UNIX.
#[cfg(target_family = "unix")]
pub fn kill_process_given_pid(pid: Pid, signal: usize) -> anyhow::Result<()> {
// SAFETY: the signal should be valid, and we act properly on an error (exit
// code not 0).
// SAFETY: the signal should be valid, and we act properly on an error (exit code not 0).
let output = unsafe { libc::kill(pid, signal as i32) };
if output != 0 {