This project is closed and read-only.
Actions
Backport #2559
closedIO#write raises Errno::EINVAL instead of expected Errno::EPIPE
Backport #2559:
IO#write raises Errno::EINVAL instead of expected Errno::EPIPE
Status:
Closed
Assignee:
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
Actions