summaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-07 12:41:30 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-07 12:41:30 +0000
commit1c43f4f8024c811c688a6a262d1ebc245da8b149 (patch)
treec3c8f08411fb61f17778da05830385a1e421d256 /thread.c
parent4fa29960268b391eb1d0887258aafc818ffd2750 (diff)
downloadruby-1c43f4f8024c811c688a6a262d1ebc245da8b149.tar.gz
ruby-1c43f4f8024c811c688a6a262d1ebc245da8b149.tar.xz
ruby-1c43f4f8024c811c688a6a262d1ebc245da8b149.zip
* thread.c (rb_thread_execute_interrupts): invoke ensure when
main thread exits. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/thread.c b/thread.c
index 763b48ec6..0b340632d 100644
--- a/thread.c
+++ b/thread.c
@@ -700,16 +700,7 @@ rb_thread_execute_interrupts(rb_thread_t *th)
th->thrown_errinfo = 0;
thread_debug("rb_thread_execute_interrupts: %ld\n", err);
- if (err == eKillSignal) {
- th->errinfo = INT2FIX(TAG_FATAL);
- TH_JUMP_TAG(th, TAG_FATAL);
- }
- else if (err == eTerminateSignal) {
- /* rewind to toplevel stack */
- while (th->tag->prev) {
- th->tag = th->tag->prev;
- }
-
+ if (err == eKillSignal || err == eTerminateSignal) {
th->errinfo = INT2FIX(TAG_FATAL);
TH_JUMP_TAG(th, TAG_FATAL);
}