[前][次][番号順一覧][スレッド一覧]

ruby-changes:39308

From: nobu <ko1@a...>
Date: Sun, 26 Jul 2015 11:29:15 +0900 (JST)
Subject: [ruby-changes:39308] nobu:r51389 (trunk): signal.c: discard SIGSYS

nobu	2015-07-26 11:29:03 +0900 (Sun, 26 Jul 2015)

  New Revision: 51389

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51389

  Log:
    signal.c: discard SIGSYS
    
    * signal.c (default_handler, Init_signal): discard SIGSYS, ENOSYS
      should raise a SystemCallError always instead.

  Modified files:
    trunk/ChangeLog
    trunk/signal.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51388)
+++ ChangeLog	(revision 51389)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jul 26 11:29:01 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* ext/openssl/ossl_ssl.c (ossl_call_servername_cb): set the ssl context
Index: signal.c
===================================================================
--- signal.c	(revision 51388)
+++ signal.c	(revision 51389)
@@ -935,6 +935,13 @@ check_reserved_signal_(const char *name, https://github.com/ruby/ruby/blob/trunk/signal.c#L935
 }
 #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) https://github.com/ruby/ruby/blob/trunk/signal.c#L1069
         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) https://github.com/ruby/ruby/blob/trunk/signal.c#L1489
 #ifdef SIGPIPE
     install_sighandler(SIGPIPE, SIG_IGN);
 #endif
+#ifdef SIGSYS
+    install_sighandler(SIGSYS, sig_do_nothing);
+#endif
 
 #if defined(SIGCLD)
     init_sigchld(SIGCLD);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]