From fb974034bb8fd1f014a00673253260fdb05882e1 Mon Sep 17 00:00:00 2001 From: James Reggio Date: Wed, 6 Apr 2016 21:00:04 -0400 Subject: [PATCH] src: add SIGINFO to supported signals Though not a POSIX signal, SIGINFO is supported by BSD systems (including Mac OS X) and is amongst the few signals that can be triggered in a terminal via a simple key combination (CTRL-T). On Linux, SIGINFO is an alias for SIGPWR; hence the defensive conditionals in src/node.cc. --- src/node.cc | 6 ++++++ src/node_constants.cc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/node.cc b/src/node.cc index 53d390a467983a..081905cfc0747c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -704,6 +704,12 @@ const char *signo_string(int signo) { # endif #endif +#ifdef SIGINFO +# if !defined(SIGPWR) || SIGINFO != SIGPWR + SIGNO_CASE(SIGINFO); +# endif +#endif + #ifdef SIGSYS SIGNO_CASE(SIGSYS); #endif diff --git a/src/node_constants.cc b/src/node_constants.cc index ed75b01fbf9213..87443c95be1b6d 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -716,6 +716,10 @@ void DefineSignalConstants(Local target) { NODE_DEFINE_CONSTANT(target, SIGPWR); #endif +#ifdef SIGINFO + NODE_DEFINE_CONSTANT(target, SIGINFO); +#endif + #ifdef SIGSYS NODE_DEFINE_CONSTANT(target, SIGSYS); #endif