Skip to content

Commit

Permalink
Add SIGINFO support on *BSD systems including macOS. (#133)
Browse files Browse the repository at this point in the history
Add SIGINFO support on *BSD systems including macOS.
  • Loading branch information
michael-yuji authored May 16, 2022
1 parent c7c68d4 commit 09e8930
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ pub mod consts {
#[cfg(not(any(windows, target_os = "haiku")))]
pub use libc::SIGIO;

#[cfg(any(
target_os="freebsd", target_os="dragonfly", target_os="netbsd", target_os="openbsd",
target_os="macos"))]
pub use libc::SIGINFO;

#[cfg(windows)]
pub use libc::{SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM};

Expand Down
4 changes: 4 additions & 0 deletions src/low_level/signal_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ const DETAILS: &[Details] = &[
s!(SIGHUP, Term),
s!(SIGILL, Term),
s!(SIGINT, Term),
#[cfg(any(
target_os="freebsd", target_os="dragonfly", target_os="netbsd",
target_os="openbsd", target_os="macos"))]
s!(SIGINFO, Ignore),
#[cfg(not(target_os = "haiku"))]
s!(SIGIO, Ignore),
// Can't override anyway, but...
Expand Down

0 comments on commit 09e8930

Please sign in to comment.