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

ruby-changes:49737

From: nagachika <ko1@a...>
Date: Mon, 15 Jan 2018 22:27:34 +0900 (JST)
Subject: [ruby-changes:49737] nagachika:r61854 (ruby_2_4): merge revision(s) 60079: [Backport #13794]

nagachika	2018-01-15 22:27:28 +0900 (Mon, 15 Jan 2018)

  New Revision: 61854

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

  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_4/
  Modified files:
    branches/ruby_2_4/thread_pthread.c
    branches/ruby_2_4/version.h
Index: ruby_2_4/thread_pthread.c
===================================================================
--- ruby_2_4/thread_pthread.c	(revision 61853)
+++ ruby_2_4/thread_pthread.c	(revision 61854)
@@ -1318,17 +1318,21 @@ void https://github.com/ruby/ruby/blob/trunk/ruby_2_4/thread_pthread.c#L1318
 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_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 61853)
+++ ruby_2_4/version.h	(revision 61854)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.4"
-#define RUBY_RELEASE_DATE "2017-12-25"
-#define RUBY_PATCHLEVEL 227
+#define RUBY_RELEASE_DATE "2018-01-15"
+#define RUBY_PATCHLEVEL 228
 
-#define RUBY_RELEASE_YEAR 2017
-#define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 25
+#define RUBY_RELEASE_YEAR 2018
+#define RUBY_RELEASE_MONTH 1
+#define RUBY_RELEASE_DAY 15
 
 #include "ruby/version.h"
 
Index: ruby_2_4
===================================================================
--- ruby_2_4	(revision 61853)
+++ ruby_2_4	(revision 61854)

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

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

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