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.

PR-URL: #6093
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
jamesreggio authored and MylesBorins committed Apr 21, 2016
1 parent 24ec701 commit 9f2dc70
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 @@ -692,6 +692,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 9f2dc70

Please sign in to comment.