diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-02-20 10:09:31 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-02-20 10:09:31 +0000 |
commit | 593808ddf9ffdba46d2548603fbdc4dd074cb54c (patch) | |
tree | 985541cf417da499a9da35c091ee60e20641b84c /eval.c | |
parent | a20e4855d611098f269ded64135bd4c5f1e5f130 (diff) | |
download | ruby-593808ddf9ffdba46d2548603fbdc4dd074cb54c.tar.gz ruby-593808ddf9ffdba46d2548603fbdc4dd074cb54c.tar.xz ruby-593808ddf9ffdba46d2548603fbdc4dd074cb54c.zip |
* eval.c (rb_thread_remove): thread may die in the process of
rb_thread_die(). this change was suggested by Rudi Cilibrasi
<cilibrar@drachma.ugcs.caltech.edu>.
* eval.c (rb_thread_start_0): main thread swapped by fork() may
terminate rb_thread_start_0() successfully. call ruby_stop(0);
this change too was suggested by Rudi.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -7980,6 +7980,7 @@ rb_thread_remove(th) rb_thread_ready(th); rb_thread_die(th); + if (th->status == THREAD_KILLED) return; /* died in process */ th->prev->next = th->next; th->next->prev = th->prev; } @@ -9004,6 +9005,7 @@ rb_thread_start_0(fn, arg, th_arg) } } rb_thread_schedule(); + ruby_stop(0); /* last thread termination */ return 0; /* not reached */ } |