From 9a3f73126a7d4e96214da5caff37db140222a446 Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Mon, 5 Aug 2019 22:05:31 +0300 Subject: [PATCH] Skip SIGPWR, SIGSTKFLT on macos --- vm/src/stdlib/signal.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vm/src/stdlib/signal.rs b/vm/src/stdlib/signal.rs index cabeb12f7..d72085ea0 100644 --- a/vm/src/stdlib/signal.rs +++ b/vm/src/stdlib/signal.rs @@ -138,7 +138,6 @@ fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) -> "SIGUSR2" => ctx.new_int(libc::SIGUSR2 as u8), "SIGPIPE" => ctx.new_int(libc::SIGPIPE as u8), "SIGALRM" => ctx.new_int(libc::SIGALRM as u8), - "SIGSTKFLT" => ctx.new_int(libc::SIGSTKFLT as u8), "SIGCHLD" => ctx.new_int(libc::SIGCHLD as u8), "SIGCONT" => ctx.new_int(libc::SIGCONT as u8), "SIGSTOP" => ctx.new_int(libc::SIGSTOP as u8), @@ -152,10 +151,17 @@ fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) -> "SIGPROF" => ctx.new_int(libc::SIGPROF as u8), "SIGWINCH" => ctx.new_int(libc::SIGWINCH as u8), "SIGIO" => ctx.new_int(libc::SIGIO as u8), - "SIGPWR" => ctx.new_int(libc::SIGPWR as u8), "SIGSYS" => ctx.new_int(libc::SIGSYS as u8), }); + #[cfg(not(target_os = "macos"))] + { + extend_module!(vm, module, { + "SIGPWR" => ctx.new_int(libc::SIGPWR as u8), + "SIGSTKFLT" => ctx.new_int(libc::SIGSTKFLT as u8), + }); + } + module }