diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-26 09:28:35 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-26 09:28:35 +0000 |
commit | 521af835583fba7793650c2a9203c43f31800642 (patch) | |
tree | 47bb922ab6041080e8edb13394a7ee3499164c05 /signal.c | |
parent | 458796d4f1dfef954f570c9b8355088b88d8f895 (diff) | |
download | ruby-521af835583fba7793650c2a9203c43f31800642.tar.gz |
* signal.c (signal_exec): add volatile to make sure setjmp safe.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -624,7 +624,7 @@ static void signal_exec(VALUE cmd, int safe, int sig) { rb_thread_t *cur_th = GET_THREAD(); - int old_in_trap = cur_th->in_trap; + volatile int old_in_trap = cur_th->in_trap; int state; cur_th->in_trap = 1; @@ -634,6 +634,7 @@ signal_exec(VALUE cmd, int safe, int sig) rb_eval_cmd(cmd, rb_ary_new3(1, signum), safe); } TH_POP_TAG(); + cur_th = GET_THREAD(); cur_th->in_trap = old_in_trap; if (state) { |