From 09e8930fdd3f1bcdc98248e0074ec8f314889563 Mon Sep 17 00:00:00 2001 From: michael-yuji Date: Tue, 17 May 2022 01:48:19 +0800 Subject: [PATCH] Add SIGINFO support on *BSD systems including macOS. (#133) Add SIGINFO support on *BSD systems including macOS. --- src/lib.rs | 5 +++++ src/low_level/signal_details.rs | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 454003c..60a2a27 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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}; diff --git a/src/low_level/signal_details.rs b/src/low_level/signal_details.rs index 55cb521..763c15e 100644 --- a/src/low_level/signal_details.rs +++ b/src/low_level/signal_details.rs @@ -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...