This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sendfile


Christoph Hellwig wrote:
> Linux sendfile isn't guarenteed to work on anything

Well the manpage gives some guarantees:

       This call copies data  between  one  file  descriptor  and
       another.   Either  or  both  of these file descriptors may
       refer to a socket.  in_fd  should  be  a  file  descriptor
       opened  for  reading  and  out_fd  should  be a descriptor
       opened for writing. ...

       Presently  the  descriptor  from which data is read cannot
       correspond to a socket, it must correspond to a file which
       supports mmap()-like operations.

and according to my reading of the 2.4 kernel the must-mmap-input
restriction is the only one.

> e.g. Linux 2.5-CURRENT sendfile works also only on sockets.

Then it's a regression in the kernel, features (2.4) > features (2.5).

Bruno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]