Project

General

Profile

Actions

Bug #4683

closed

[PATCH] io.c: copy_stream execute interrupts and retry

Added by normalperson (Eric Wong) over 13 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-05-13 trunk 31504) [x86_64-linux]
Backport:
[ruby-core:36156]

Description

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.


Files

0001-io.c-copy_stream-execute-interrupts-and-retry.patch (4.02 KB) 0001-io.c-copy_stream-execute-interrupts-and-retry.patch patch to fix the issue normalperson (Eric Wong), 05/13/2011 06:56 AM
0002-test_io-add-test-for-copy_stream-failing-on-EINTR.patch (1.75 KB) 0002-test_io-add-test-for-copy_stream-failing-on-EINTR.patch test case, may not be portable... normalperson (Eric Wong), 05/13/2011 06:56 AM
copy_stream_interrupt_handling.patch (7.97 KB) copy_stream_interrupt_handling.patch akr (Akira Tanaka), 05/29/2011 07:29 PM
copy_stream_interrupt_handling-2.patch (9.42 KB) copy_stream_interrupt_handling-2.patch akr (Akira Tanaka), 06/02/2011 08:20 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #4680: [PATCH] io.c: fix busy wait with sendfile()Closedakr (Akira Tanaka)05/13/2011Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0