From bda5eac1157d3c7d961b85db4831f04fc7db343a Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 2 Oct 2013 07:26:54 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'io.c') diff --git a/io.c b/io.c index 15fc799d69..5261c3ee5c 100644 --- a/io.c +++ b/io.c @@ -4433,6 +4433,8 @@ rb_io_close_read(VALUE io) 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; -- cgit v1.2.3