Skip to content

Commit 9f2dc70

Browse files
jamesreggioMylesBorins
authored andcommitted
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 24ec701 commit 9f2dc70

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
@@ -692,6 +692,12 @@ const char *signo_string(int signo) {
692692
# endif
693693
#endif
694694

695+
#ifdef SIGINFO
696+
# if !defined(SIGPWR) || SIGINFO != SIGPWR
697+
SIGNO_CASE(SIGINFO);
698+
# endif
699+
#endif
700+
695701
#ifdef SIGSYS
696702
SIGNO_CASE(SIGSYS);
697703
#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)