aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-02 07:26:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-02 07:26:54 +0000
commitbda5eac1157d3c7d961b85db4831f04fc7db343a (patch)
tree6bac4f6502edb30440f839f2f81dde15866a1bf6
parentd748f5b6ebde523f1a2f380dd8c2a7750d8c5e82 (diff)
downloadruby-bda5eac1157d3c7d961b85db4831f04fc7db343a.tar.gz
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
-rw-r--r--ChangeLog5
-rw-r--r--io.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b84c8e5254..f6c32f285c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 2 16:26:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* vm_core.h: use __has_attribute() instead of __clang__major__ because
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;