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

ruby-changes:50024

From: usa <ko1@a...>
Date: Wed, 31 Jan 2018 22:49:19 +0900 (JST)
Subject: [ruby-changes:50024] usa:r62142 (ruby_2_3): merge revision(s) 60079: [Backport #13794]

usa	2018-01-31 22:49:13 +0900 (Wed, 31 Jan 2018)

  New Revision: 62142

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62142

  Log:
    merge revision(s) 60079: [Backport #13794]
    
    thread_pthread.c: do not wakeup inside child processes
    
    * thread_pthread.c (rb_thread_wakeup_timer_thread): check
      ownership before incrementing
      (rb_thread_wakeup_timer_thread_low): ditto
      [Bug #13794] [ruby-core:83064]

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/thread_pthread.c
    branches/ruby_2_3/version.h
Index: ruby_2_3/ChangeLog
===================================================================
--- ruby_2_3/ChangeLog	(revision 62141)
+++ ruby_2_3/ChangeLog	(revision 62142)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1
+Wed Jan 31 22:48:41 2018  Eric Wong  <normalperson@y...>
+
+	thread_pthread.c: do not wakeup inside child processes
+
+	* thread_pthread.c (rb_thread_wakeup_timer_thread): check
+	  ownership before incrementing
+	  (rb_thread_wakeup_timer_thread_low): ditto
+	  [Bug #13794] [ruby-core:83064]
+
 Wed Jan 31 22:46:36 2018  Rei Odaira  <Rei.Odaira@g...>
 
 	* configure.in (rb_cv_lgamma_r_pm0): check if lgamma_r(+0.0)
Index: ruby_2_3/thread_pthread.c
===================================================================
--- ruby_2_3/thread_pthread.c	(revision 62141)
+++ ruby_2_3/thread_pthread.c	(revision 62142)
@@ -1313,17 +1313,21 @@ void https://github.com/ruby/ruby/blob/trunk/ruby_2_3/thread_pthread.c#L1313
 rb_thread_wakeup_timer_thread(void)
 {
     /* must be safe inside sighandler, so no mutex */
-    ATOMIC_INC(timer_thread_pipe.writing);
-    rb_thread_wakeup_timer_thread_fd(&timer_thread_pipe.normal[1]);
-    ATOMIC_DEC(timer_thread_pipe.writing);
+    if (timer_thread_pipe.owner_process == getpid()) {
+	ATOMIC_INC(timer_thread_pipe.writing);
+	rb_thread_wakeup_timer_thread_fd(&timer_thread_pipe.normal[1]);
+	ATOMIC_DEC(timer_thread_pipe.writing);
+    }
 }
 
 static void
 rb_thread_wakeup_timer_thread_low(void)
 {
-    ATOMIC_INC(timer_thread_pipe.writing);
-    rb_thread_wakeup_timer_thread_fd(&timer_thread_pipe.low[1]);
-    ATOMIC_DEC(timer_thread_pipe.writing);
+    if (timer_thread_pipe.owner_process == getpid()) {
+	ATOMIC_INC(timer_thread_pipe.writing);
+	rb_thread_wakeup_timer_thread_fd(&timer_thread_pipe.low[1]);
+	ATOMIC_DEC(timer_thread_pipe.writing);
+    }
 }
 
 /* VM-dependent API is not available for this function */
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 62141)
+++ ruby_2_3/version.h	(revision 62142)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.7"
 #define RUBY_RELEASE_DATE "2018-01-31"
-#define RUBY_PATCHLEVEL 403
+#define RUBY_PATCHLEVEL 404
 
 #define RUBY_RELEASE_YEAR 2018
 #define RUBY_RELEASE_MONTH 1
Index: ruby_2_3
===================================================================
--- ruby_2_3	(revision 62141)
+++ ruby_2_3	(revision 62142)

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r60079

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

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