From 562cb0ae5997006441221710d531ac166546319d Mon Sep 17 00:00:00 2001 From: kosaki Date: Mon, 19 Nov 2012 10:38:02 +0000 Subject: [PATCH] * signal.c (install_sighandler): added comments why we need rb_disable_interrupt(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ signal.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12362d271b..85abbc133a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 20 09:36:55 2012 KOSAKI Motohiro + + * signal.c (install_sighandler): added comments why we need + rb_disable_interrupt(). + Tue Nov 20 09:31:33 2012 KOSAKI Motohiro * signal.c (rb_disable_interrupt, rb_enable_interrupt): removed diff --git a/signal.c b/signal.c index a56152e9e4..3f4a90b522 100644 --- a/signal.c +++ b/signal.c @@ -986,8 +986,10 @@ install_sighandler(int signum, sighandler_t handler) { 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); }