From c1334f5068b9c404be64325bbf90c0b7ff4c00d0 Mon Sep 17 00:00:00 2001 From: Philipp Matthias Schaefer Date: Mon, 25 Apr 2016 13:07:13 +0200 Subject: [PATCH] Add missing signals. --- src/sys/signal.rs | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 753c156250..a881a51eee 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -11,36 +11,47 @@ pub use libc::{ SIGINT, SIGQUIT, SIGILL, + SIGTRAP, SIGABRT, + SIGBUS, SIGFPE, SIGKILL, + SIGUSR1, SIGSEGV, + SIGUSR2, SIGPIPE, SIGALRM, SIGTERM, - SIGTRAP, - SIGIOT, - SIGBUS, - SIGSYS, - SIGURG, + SIGCHLD, + SIGCONT, SIGSTOP, SIGTSTP, - SIGCONT, - SIGCHLD, SIGTTIN, SIGTTOU, - SIGIO, + SIGURG, SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, - SIGUSR1, - SIGUSR2, + SIGIO, + SIGSYS, }; -// This doesn't always exist, but when it does, it's 7 -pub const SIGEMT: libc::c_int = 7; +#[cfg(target_os = "macos")] +pub use libc::{ + SIGEMT, + SIGINFO, +}; + +#[cfg(not(target_os = "macos"))] +pub use libc::{ + SIGPWR, + SIGSTKFLT, + SIGIOT, // Alias for SIGABRT + SIGPOLL, // Alias for SIGIO + SIGUNUSED, // Alias for 31 +}; pub const NSIG: libc::c_int = 32;