Skip to content

Commit fb5f66a

Browse files
jamesreggiobnoordhuis
authored andcommittedApr 14, 2016
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: #6093 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent ae18bbe commit fb5f66a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎src/node.cc

+6
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,12 @@ const char *signo_string(int signo) {
704704
# endif
705705
#endif
706706

707+
#ifdef SIGINFO
708+
# if !defined(SIGPWR) || SIGINFO != SIGPWR
709+
SIGNO_CASE(SIGINFO);
710+
# endif
711+
#endif
712+
707713
#ifdef SIGSYS
708714
SIGNO_CASE(SIGSYS);
709715
#endif

‎src/node_constants.cc

+4
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,10 @@ void DefineSignalConstants(Local<Object> target) {
716716
NODE_DEFINE_CONSTANT(target, SIGPWR);
717717
#endif
718718

719+
#ifdef SIGINFO
720+
NODE_DEFINE_CONSTANT(target, SIGINFO);
721+
#endif
722+
719723
#ifdef SIGSYS
720724
NODE_DEFINE_CONSTANT(target, SIGSYS);
721725
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.