Skip to content

Commit c990504

Browse files
Raise command signal to the current process
1 parent f518ec5 commit c990504

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build_system/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::process::{Command, ExitStatus, Output};
1111

1212
#[cfg(unix)]
1313
unsafe extern "C" {
14-
fn raise(signal: c_int) -> c_int;
14+
fn kill(pid: c_int, signal: c_int) -> c_int;
1515
}
1616

1717
fn exec_command(
@@ -28,7 +28,7 @@ fn exec_command(
2828
{
2929
if let Some(signal) = status.signal() {
3030
unsafe {
31-
raise(signal as _);
31+
kill(getpid(), signal as _);
3232
}
3333
// In case the signal didn't kill the current process.
3434
return Err(command_error(input, &cwd, format!("Process received signal {}", signal)));

0 commit comments

Comments
 (0)