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

ruby-changes:25669

From: kosaki <ko1@a...>
Date: Mon, 19 Nov 2012 19:38:10 +0900 (JST)
Subject: [ruby-changes:25669] kosaki:r37726 (trunk): * signal.c (install_sighandler): added comments why we need

kosaki	2012-11-19 19:38:02 +0900 (Mon, 19 Nov 2012)

  New Revision: 37726

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

  Log:
    * signal.c (install_sighandler): added comments why we need
      rb_disable_interrupt().

  Modified files:
    trunk/ChangeLog
    trunk/signal.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37725)
+++ ChangeLog	(revision 37726)
@@ -1,3 +1,8 @@
+Tue Nov 20 09:36:55 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* signal.c (install_sighandler): added comments why we need
+	  rb_disable_interrupt().
+
 Tue Nov 20 09:31:33 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* signal.c (rb_disable_interrupt, rb_enable_interrupt): removed
Index: signal.c
===================================================================
--- signal.c	(revision 37725)
+++ signal.c	(revision 37726)
@@ -986,8 +986,10 @@
 {
     sighandler_t old;
 
+    /* At this time, there is no subthread. Then sigmask guarantee atomics. */
     rb_disable_interrupt();
     old = ruby_signal(signum, handler);
+    /* signal handler should be inherited during exec. */
     if (old != SIG_DFL) {
 	ruby_signal(signum, old);
     }

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

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