Project

General

Profile

Actions

Feature #9427

closed

[PATCH] io.c: remove socket check for sendfile

Added by normalperson (Eric Wong) about 10 years ago. Updated about 10 years ago.

Status:
Closed
Target version:
[ruby-core:59856]

Description

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0