summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-26 02:29:03 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-26 02:29:03 (GMT)
commit38e62df9f6f6b759fef4c8ccaec352654d1070dc (patch)
treee70c89c59248740ac3c7926606f446de3fca339d /signal.c
parenta894dc6a998b6a90e59a235a4045d1e893469415 (diff)
signal.c: discard SIGSYS
* signal.c (default_handler, Init_signal): discard SIGSYS, ENOSYS should raise a SystemCallError always instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index 5d5cb6b..34d229a 100644
--- a/signal.c
+++ b/signal.c
@@ -935,6 +935,13 @@ check_reserved_signal_(const char *name, size_t name_len)
}
#endif
+#ifdef SIGSYS
+static RETSIGTYPE
+sig_do_nothing(int sig)
+{
+}
+#endif
+
static void
signal_exec(VALUE cmd, int safe, int sig)
{
@@ -1062,6 +1069,11 @@ default_handler(int sig)
func = SIG_IGN;
break;
#endif
+#ifdef SIGSYS
+ case SIGSYS:
+ func = sig_do_nothing;
+ break;
+#endif
default:
func = SIG_DFL;
break;
@@ -1477,6 +1489,9 @@ Init_signal(void)
#ifdef SIGPIPE
install_sighandler(SIGPIPE, SIG_IGN);
#endif
+#ifdef SIGSYS
+ install_sighandler(SIGSYS, sig_do_nothing);
+#endif
#if defined(SIGCLD)
init_sigchld(SIGCLD);