* signal.c (install_sighandler): fixed a race.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-07-12 05:08:28 +00:00
parent 89e2951bde
commit c307523565
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Tue Jul 12 14:07:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* signal.c (install_sighandler): fixed a race.
Tue Jul 12 13:49:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* signal.c (sig_trap): don't permit to change a signal handler which

View File

@ -1008,10 +1008,12 @@ install_sighandler(int signum, sighandler_t handler)
{
sighandler_t old;
rb_disable_interrupt();
old = ruby_signal(signum, handler);
if (old != SIG_DFL) {
ruby_signal(signum, old);
}
rb_enable_interrupt();
}
#if defined(SIGCLD) || defined(SIGCHLD)