Skip to content

Commit

Permalink
src: add SIGINFO to supported signals
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jamesreggio committed Apr 7, 2016
1 parent d4eafd0 commit fb97403
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/node_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb97403

Please sign in to comment.