sendfile(2) behaviour has changed ?

From: Zilvinas Valinskas (
Date: Wed Oct 16 2002 - 03:49:08 EST

This sample code copies a file using sendfile(2) call works just fine on
2.2.x and 2.4.x kernels. On 2.5.x kernels (not sure starting which
version) it stopped working. Program terminates with EINVAL error.

$ ./sendfile
sendfile: Invalid argument

Is this expected behaviour ? that sendfile(2) on 2.5.4x linux kernel requires
socket as an output fd paramter ?

Was it ever legal to copy file(s) on filesystem using sendfile(2) ?
(which was kindda nice feature ... )

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:27 EST