[PATCH] PR libstdc++/83279 handle sendfile not copying entire file
Jonathan Wakely
jwakely@redhat.com
Fri Jan 5 21:44:00 GMT 2018
On 14/12/17 21:53 +0000, Jonathan Wakely wrote:
>I failed to notice that the man page for sendfile(3) says it won't
>copy more than 2GiB. This refactors the code to first try sendfile
>(because it's fast if it works) and if that fails, or stops before the
>end of the file, then use filebufs to copy what's left over.
>
>I'm not adding a test because creating two files larger than 2G isn't
>a good idea, but I've tested it locally.
>
> PR libstdc++/83279
> * src/filesystem/std-ops.cc (do_copy_file): Handle sendfile not
> copying entire file.
This restores the non-null offset argument to sendfile, which is
required by Solaris.
Tested x86_64-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2370 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180105/28c60831/attachment.bin>
More information about the Libstdc++
mailing list