Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
jamesreggio committed Apr 7, 2016
commit fb974034bb8fd1f014a00673253260fdb05882e1
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