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

ruby-changes:51531

From: normal <ko1@a...>
Date: Sun, 24 Jun 2018 21:36:50 +0900 (JST)
Subject: [ruby-changes:51531] normal:r63741 (trunk): process.c (ruby_fork_ruby): fix race in signal handling

normal	2018-06-24 21:36:44 +0900 (Sun, 24 Jun 2018)

  New Revision: 63741

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

  Log:
    process.c (ruby_fork_ruby): fix race in signal handling
    
    We must block signals before stopping timer-thread, otherwise
    signal handing may be delayed until (and if) another signal
    is received after timer-thread is restarted.
    
    [ruby-core:87622] [Bug #14868] [Bug #13916]

  Modified files:
    trunk/process.c
Index: process.c
===================================================================
--- process.c	(revision 63740)
+++ process.c	(revision 63741)
@@ -3690,8 +3690,8 @@ rb_fork_ruby(int *status) https://github.com/ruby/ruby/blob/trunk/process.c#L3690
 
     while (1) {
 	prefork();
-	before_fork_ruby();
 	disable_child_handler_before_fork(&old);
+	before_fork_ruby();
 	pid = fork();
 	err = errno;
 	after_fork_ruby();

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

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