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: FreeBSD port (29): sendfile


> Since FreeBSD's native sendfile() system call is not the same as the Linux
> one (works only on sockets), here is a patch that adds an emulation of it
> using read/write to sysdeps/posix/.

I don't think this is useful.  sendfile is always an optimization, and any
application needs to be prepared to fall back to other methods when it is
not available.  It may be entirely unavailable, or it may only work on
certain types of file descriptors for the input and/or output, or have an
unknown other set of constraints that make the system punt.  If the system
punts on the optimization, I think it is more useful for the lack of a
useful sendfile to be reflected by having it fail so the application can
fall back to other methods.  (Perhaps it will use mmap or do something else
entirely when it knows there is no specially-optimized solution available.)


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