summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-07 08:16:11 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-07 08:16:11 +0000
commit09edb78ff0548cba7a545b3fd579b1cdcd5a36be (patch)
treeb8c51439ab0eb6b0ab531887fd57c9b60f8f75c3 /eval.c
parente90f7de04fac518947c6da19ecdb31597e807c0d (diff)
* eval.c (rb_thread_start_0): should unset time_thread_alive_p.
[ruby-talk:257219], [ruby-core:11542], [ruby-dev:31253] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 3dd107654d..7911ce8bfa 100644
--- a/eval.c
+++ b/eval.c
@@ -11846,6 +11846,12 @@ rb_thread_stop_timer()
}
void
+rb_child_atfork()
+{
+ time_thread_alive_p = 0;
+}
+
+void
rb_thread_cancel_timer()
{
#ifdef _THREAD_SAFE
@@ -11939,6 +11945,7 @@ rb_thread_start_0(fn, arg, th)
#ifdef _THREAD_SAFE
pthread_create(&time_thread, 0, thread_timer, 0);
time_thread_alive_p = 1;
+ pthread_atfork(0, 0, rb_child_atfork);
#else
rb_thread_start_timer();
#endif