From: Eric Wong Date: 2011-05-13T07:01:43+09:00 Subject: [ruby-core:36156] [Ruby 1.9 - Bug #4683][Open] [PATCH] io.c: copy_stream execute interrupts and retry Issue #4683 has been reported by Eric Wong. ---------------------------------------- Bug #4683: [PATCH] io.c: copy_stream execute interrupts and retry http://redmine.ruby-lang.org/issues/4683 Author: Eric Wong Status: Open Priority: Normal Assignee: Category: core Target version: 1.9.3 ruby -v: ruby 1.9.3dev (2011-05-13 trunk 31504) [x86_64-linux] It's debatable whether this is a bug or not, but I think the current interrupt handling behavior with IO.copy_stream is fragile and unpredictable, and inconsistent with IO#read and IO#write. This is to be consistent with IO#read and IO#write behavior where rb_io_wait_readable() and rb_io_wait_writable() retry on interrupt (EAGAIN/ERESTART) instead of returning a short copy or raising Errno::EINTR. -- http://redmine.ruby-lang.org