summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--signal.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index acf8de672e..6d7bbe78a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jul 26 11:29:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * signal.c (default_handler, Init_signal): discard SIGSYS, ENOSYS
+ should raise a SystemCallError always instead.
+
Sun Jul 26 10:26:35 2015 Aaron Patterson <tenderlove@ruby-lang.org>
* ext/openssl/ossl_ssl.c (ossl_call_servername_cb): set the ssl context
diff --git a/signal.c b/signal.c
index 5d5cb6b2b6..34d229a71d 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);