From 38e62df9f6f6b759fef4c8ccaec352654d1070dc Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 26 Jul 2015 02:29:03 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ signal.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) 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 + + * signal.c (default_handler, Init_signal): discard SIGSYS, ENOSYS + should raise a SystemCallError always instead. + Sun Jul 26 10:26:35 2015 Aaron Patterson * 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) { @@ -1061,6 +1068,11 @@ default_handler(int sig) case SIGPIPE: func = SIG_IGN; break; +#endif +#ifdef SIGSYS + case SIGSYS: + func = sig_do_nothing; + break; #endif default: func = SIG_DFL; @@ -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);