On 12/16/2014 04:44 PM, enh wrote:
> 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?

No, I just missed that paragraph. (Also spending a lot of time with
embedded BSPs that use old kernels because broadcom or ti or code
sourcery or similar couldn't be bothered to push changes upstream. The
one I'm poking at for $DAYJOB is cutting edge: 3.4.3!)

>        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.

Oh good, it did go in.

> 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.)

Yay. I remember the conversation about it happening at the time but
hadn't looked up if/when it actually made it in. Moving xsendfile() to
lib/portability.c and making it use the thing is on my todo list. That's
another way of saying "I have this giant cloud of things I keep meaning
to do, which I add to faster than I remove from"...

Thanks for the heads up,

Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to