summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-12 16:30:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-12 16:30:13 +0000
commit168f2f470f42033364fe374f199a4beb8180baec (patch)
tree200c68649e02c253196019a236c32c9b0e735ed0
parent4ef1062c6f0b26d8976eba8c8f227e18ba7c6a15 (diff)
* eval.c (rb_thread_schedule): current thread may be dead when
deadlock. (ruby-bugs:PR#588) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--eval.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f057bfdf06..759611d6912 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb 13 01:30:10 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+
+ * eval.c (rb_thread_schedule): current thread may be dead when
+ deadlock. (ruby-bugs:PR#588)
+
Thu Feb 13 00:09:47 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* file.c (strrdirsep): ignore trailing directory separators.
diff --git a/eval.c b/eval.c
index bd86870d8c6..bfd02671264 100644
--- a/eval.c
+++ b/eval.c
@@ -8230,7 +8230,9 @@ rb_thread_schedule()
next = main_thread;
rb_thread_ready(next);
next->status = THREAD_TO_KILL;
- rb_thread_save_context(curr_thread);
+ if (!rb_thread_dead(curr_thread)) {
+ rb_thread_save_context(curr_thread);
+ }
rb_thread_deadlock();
}
next->wait_for = 0;