Actions
Bug #3484
closedIO.copy_stream w/sendfile fails on large files under 32-bit
ruby -v:
ruby 1.9.3dev (2010-06-26 trunk 28443) [i686-linux]
Backport:
Description
=begin
When IO.copy_stream uses sendfile() under 32-bit Linux, it fails for
large files (>2G) because a single sendfile() is limited to the maximum value
of ssize_t (LONG_MAX). Attached is a short patch that breaks up large sendfile()
calls and reuses the existing retry logic.
=end
Files
Updated by normalperson (Eric Wong) over 14 years ago
=begin
Err, fails as in truncates files greater than UINT_MAX bytes long and
hits EINVAL and falls back to the read/write loop for files between
INT_MAX and UINT_MAX bytes long
=end
Updated by normalperson (Eric Wong) over 14 years ago
=begin
And the stupid ugly cast in my patch for ssize_t_max can fail under some compilers,
Just using "size_t_max = LONG_MAX" would be more fool-proof and easier to read.
=end
Updated by kosaki (Motohiro KOSAKI) over 14 years ago
=begin
note: akr-san committed the fix as r28450.
=end
Updated by kosaki (Motohiro KOSAKI) over 14 years ago
- Status changed from Open to Closed
=begin
=end
Actions
Like0
Like0Like0Like0Like0