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

ruby-changes:31038

From: nobu <ko1@a...>
Date: Wed, 2 Oct 2013 16:27:11 +0900 (JST)
Subject: [ruby-changes:31038] nobu:r43117 (trunk): io.c: wait child process after close_read

nobu	2013-10-02 16:26:54 +0900 (Wed, 02 Oct 2013)

  New Revision: 43117

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

  Log:
    io.c: wait child process after close_read
    
    * io.c (rb_io_close_read): duplex IO should wait its child process
      even after close_read.

  Modified files:
    trunk/ChangeLog
    trunk/io.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43116)
+++ ChangeLog	(revision 43117)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Oct  2 16:26:49 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (rb_io_close_read): duplex IO should wait its child process
+	  even after close_read.
+
 Wed Oct  2 15:39:13 2013  NARUSE, Yui  <naruse@r...>
 
 	* vm_core.h: use __has_attribute() instead of __clang__major__ because
Index: io.c
===================================================================
--- io.c	(revision 43116)
+++ io.c	(revision 43117)
@@ -4433,6 +4433,8 @@ rb_io_close_read(VALUE io) https://github.com/ruby/ruby/blob/trunk/io.c#L4433
     if (io != write_io) {
 	rb_io_t *wfptr;
 	GetOpenFile(write_io, wfptr);
+	wfptr->pid = fptr->pid;
+	fptr->pid = 0;
         RFILE(io)->fptr = wfptr;
 	/* bind to write_io temporarily to get rid of memory/fd leak */
 	fptr->tied_io_for_writing = 0;

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

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