On Tue, Dec 16, 2014 at 2:34 PM, Rob Landley <[email protected]> wrote:
>>   This *roughly* corresponds to xsendfile(), but returning an off_t.
>
> ssize_t according to man 2 sendfile. I just hadn't yet because nothing
> was using it. If I expand it, I'd want to move towards convergence with
> the syscall... except that gratuitously wants one of its arguments to be
> a network socket for NO OBVIOUS REASON.
...
> I dunno if the genericization work made it upstream or if it needs
> splice() still. (There was talk about it on lwn.net at one point...)

do you have a old version of the man pages?

       In  Linux  kernels before 2.6.33, out_fd must refer to a socket.  Since
       Linux 2.6.33 it can be any file.  If it is a regular file,  then  send‐
       file() changes the file offset appropriately.

this isn't just a man page lie either. though i can't guarantee the
exact kernel version in which this was fixed, Android has relied on
this for many releases now. (both in the C library and the Java
libraries.)
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to