Invalid argument in sendfile() with two regular files
- by Daniel Hershcovich
I'm trying to test the sendfile() system call under Linux 2.6.32 to zero-copy data between two regular files.
As far as I understand, it should work: ever since 2.6.22, sendfile() has been implemented using splice(), and both the input file and the output file can be either regular files or sockets.
The following is the content of sendfile_test.c:…