Issue #9427 has been reported by Eric Wong.
----------------------------------------
Feature #9427: [PATCH] io.c: remove socket check for sendfile
https://bugs.ruby-lang.org/issues/9427
* Author: Eric Wong
* Status: Open
* Priority: Normal
* Assignee: Akira Tanaka
* Category: core
* Target version: current: 2.2.0
----------------------------------------
Linux uses splice internally for sendfile since 2.6.23, allowing
sendfile to work for arbitrary destinations.
We gracefully handle EINVAL/ENOSYS from sendfile anyways,
so we will hit the old fallback to read/write if the system
cannot perform sendfile to non-sockets.
Verified using strace on the following one line script:
IO.copy_stream(__FILE__, "/dev/null")
----------------------------------------------------------------
The following changes since commit 971ef822679dfa6ee63ff83a47b4e4d1aa60d146:
* ext/socket: Avoid unnecessary ppoll/select on Linux. Patch by Eric Wong. [ruby-core:57950] [Bug #9039] (2014-01-18 14:13:22 +0000)
are available in the git repository at:
git://80x24.org/ruby.git sendfile-anydest
for you to fetch changes up to 01fdf26d720a21820f4f51fade5f8b156948403b:
io.c: remove socket check for sendfile (2014-01-18 22:27:17 +0000)
----------------------------------------------------------------
Eric Wong (1):
io.c: remove socket check for sendfile
io.c | 2 --
1 file changed, 2 deletions(-)
---Files--------------------------------
0001-io.c-remove-socket-check-for-sendfile.patch (908 Bytes)
--
http://bugs.ruby-lang.org/