[macruby-changes] [4901] MacRuby/trunk/io.c

source_changes at macosforge.org source_changes at macosforge.org
Sat Nov 13 07:08:10 PST 2010


Revision: 4901
          http://trac.macosforge.org/projects/ruby/changeset/4901
Author:   watson1978 at gmail.com
Date:     2010-11-13 07:08:06 -0800 (Sat, 13 Nov 2010)
Log Message:
-----------
IO#close_{read | write} will not wait completion of child process.

Modified Paths:
--------------
    MacRuby/trunk/io.c

Modified: MacRuby/trunk/io.c
===================================================================
--- MacRuby/trunk/io.c	2010-11-10 03:24:35 UTC (rev 4900)
+++ MacRuby/trunk/io.c	2010-11-13 15:08:06 UTC (rev 4901)
@@ -360,9 +360,11 @@
 	io_struct->write_fd = -1;
     }
     if (io_struct->pid != -1) {
-	rb_last_status_set(0, io_struct->pid);
-	rb_syswait(io_struct->pid);
-	io_struct->pid = -1;
+	if (close_read && close_write) {
+	    rb_last_status_set(0, io_struct->pid);
+	    rb_syswait(io_struct->pid);
+	    io_struct->pid = -1;
+	}
     }
     if (io_struct->fd != -1 && io_struct->read_fd == -1
 	    && io_struct->write_fd == -1) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101113/1a82c549/attachment.html>


More information about the macruby-changes mailing list