Browse Source

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.

PR-URL: https://github.com/nodejs/node/pull/6093
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
process-exit-stdio-flushing
James Reggio 9 years ago
committed by Ben Noordhuis
parent
commit
fb5f66a9fa
  1. 6
      src/node.cc
  2. 4
      src/node_constants.cc

6
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

4
src/node_constants.cc

@ -716,6 +716,10 @@ void DefineSignalConstants(Local<Object> target) {
NODE_DEFINE_CONSTANT(target, SIGPWR);
#endif
#ifdef SIGINFO
NODE_DEFINE_CONSTANT(target, SIGINFO);
#endif
#ifdef SIGSYS
NODE_DEFINE_CONSTANT(target, SIGSYS);
#endif

Loading…
Cancel
Save