ruby-changes:9586
From: yugui <ko1@a...>
Date: Sun, 28 Dec 2008 18:42:28 +0900 (JST)
Subject: [ruby-changes:9586] Ruby:r21126 (ruby_1_9_1): merges r21097 from trunk into ruby_1_9_1.
yugui 2008-12-28 18:42:01 +0900 (Sun, 28 Dec 2008) New Revision: 21126 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21126 Log: merges r21097 from trunk into ruby_1_9_1. * process.c (after_exec): needs to reset before restart timer thread. * thread.c (thread_start_func_2): stops timer thread if forked in the new thread. [ruby-core:19385] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/process.c branches/ruby_1_9_1/thread.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21125) +++ ruby_1_9_1/ChangeLog (revision 21126) @@ -1,5 +1,11 @@ -Sat Dec 27 19:30:01 2008 Nobuyoshi Nakada <nobu@r...> +Sat Dec 27 19:40:56 2008 Nobuyoshi Nakada <nobu@r...> + * process.c (after_exec): needs to reset before restart timer + thread. + + * thread.c (thread_start_func_2): stops timer thread if forked in + the new thread. [ruby-core:19385] + * thread.c (rb_thread_atfork, rb_thread_atfork_before_exec): DRY. Sat Dec 27 17:08:43 2008 Nobuyoshi Nakada <nobu@r...> Index: ruby_1_9_1/thread.c =================================================================== --- ruby_1_9_1/thread.c (revision 21125) +++ ruby_1_9_1/thread.c (revision 21126) @@ -462,6 +462,9 @@ } } thread_cleanup_func(th); + if (th->vm->main_thread == th) { + rb_thread_stop_timer_thread(); + } native_mutex_unlock(&th->vm->global_vm_lock); return 0; Index: ruby_1_9_1/process.c =================================================================== --- ruby_1_9_1/process.c (revision 21125) +++ ruby_1_9_1/process.c (revision 21126) @@ -976,7 +976,7 @@ #define before_exec() \ (rb_enable_interrupt(), forked_child ? 0 : rb_thread_stop_timer_thread()) #define after_exec() \ - (rb_thread_start_timer_thread(), forked_child = 0, rb_disable_interrupt()) + (rb_thread_reset_timer_thread(), rb_thread_start_timer_thread(), forked_child = 0, rb_disable_interrupt()) #define before_fork() before_exec() #define after_fork() (GET_THREAD()->thrown_errinfo = 0, after_exec()) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/