[前][次][番号順一覧][スレッド一覧]

ruby-changes:9557

From: nobu <ko1@a...>
Date: Sat, 27 Dec 2008 19:41:10 +0900 (JST)
Subject: [ruby-changes:9557] Ruby:r21097 (trunk): * process.c (after_exec): needs to reset before restart timer

nobu	2008-12-27 19:40:57 +0900 (Sat, 27 Dec 2008)

  New Revision: 21097

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21097

  Log:
    * 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:
    trunk/ChangeLog
    trunk/process.c
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21096)
+++ ChangeLog	(revision 21097)
@@ -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 18:25:09 2008  Yukihiro Matsumoto  <matz@r...>
Index: thread.c
===================================================================
--- thread.c	(revision 21096)
+++ thread.c	(revision 21097)
@@ -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: process.c
===================================================================
--- process.c	(revision 21096)
+++ process.c	(revision 21097)
@@ -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/

[前][次][番号順一覧][スレッド一覧]