diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-29 00:48:16 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-29 00:48:16 +0000 |
commit | 98ed344ae9c97d2b273c57f35c6bde9761b1906a (patch) | |
tree | c6452c8f7829edcdb4e29b49801dd88fd53297b9 /eval.c | |
parent | 3d47e7b2854a47878fd6346586d12cb6c312df82 (diff) | |
download | ruby-98ed344ae9c97d2b273c57f35c6bde9761b1906a.tar.gz |
* eval.c (ruby_cleanup): delay THREAD_KILLED timing.
It should be located just before rb_thread_terminate_all().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -159,9 +159,6 @@ ruby_cleanup(volatile int ex) rb_thread_t *th = GET_THREAD(); int nerr; - /* protect from thread.raise */ - th->status = THREAD_KILLED; - rb_threadptr_interrupt(th); rb_threadptr_check_signal(th); PUSH_TAG(); @@ -180,6 +177,9 @@ ruby_cleanup(volatile int ex) } POP_TAG(); + /* protect from Thread#raise */ + th->status = THREAD_KILLED; + errs[0] = th->errinfo; PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { |