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

ruby-changes:18341

From: kosaki <ko1@a...>
Date: Sat, 25 Dec 2010 19:22:55 +0900 (JST)
Subject: [ruby-changes:18341] Ruby:r30364 (trunk): * io.c (pipe_open): Added rb_thread_atfork(). We must reinitialize

kosaki	2010-12-25 19:22:48 +0900 (Sat, 25 Dec 2010)

  New Revision: 30364

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

  Log:
    * io.c (pipe_open): Added rb_thread_atfork(). We must reinitialize
          GVL at new process creation.

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30363)
+++ ChangeLog	(revision 30364)
@@ -1,3 +1,8 @@
+Sat Dec 25 20:01:40 2010  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* io.c (pipe_open): Added rb_thread_atfork(). We must reinitialize
+	  GVL at new process creation.
+
 Sat Dec 25 18:26:55 2010  Tanaka Akira  <akr@f...>
 
 	* ext/socket/option.c (inspect_ipv6_mreq): new function to inspect
Index: io.c
===================================================================
--- io.c	(revision 30363)
+++ io.c	(revision 30364)
@@ -5072,6 +5072,7 @@
 	fflush(stdin);		/* is it really needed? */
 	pid = rb_fork(&status, 0, 0, Qnil);
 	if (pid == 0) {		/* child */
+	    rb_thread_atfork();
 	    popen_redirect(&arg);
 	    rb_io_synchronized(RFILE(orig_stdout)->fptr);
 	    rb_io_synchronized(RFILE(orig_stderr)->fptr);

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

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