Project

General

Profile

Actions

Backport #2559

closed

IO#write raises Errno::EINVAL instead of expected Errno::EPIPE

Added by hongli (Hongli Lai) over 14 years ago. Updated about 13 years ago.


Description

=begin
Test case:

require 'thread'

a, b = IO.pipe
Thread.new do
a.read(1)
a.close
end

sleep 0.1 # wait for thread to begin
b.write("x" * (1024 * 16)) # should be larger than pipe/socket buffer size

b.write on 1.8.7-p174 raises Errno::EPIPE, as expected.
1.8.7-p248 raises Errno::EINVAL.

It looks like this bug was introduced in revision 25918. Unapplying that revision fixes the problem.
=end


Files

io-write-fix.diff (1.33 KB) io-write-fix.diff hongli (Hongli Lai), 01/06/2010 03:37 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0