This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: FreeBSD port (29): sendfile
James Antill writes:
> it's completely broken. If you pass NULL as the off_t
> then it's supposed to use the off_t associated with the fd (just like
> read and write) ...
That's what the submitted emulation does.
> your version will just silently drop data when
> reading from a non-file as the src.
No, if you call it on an fd not supporting lseek, and with
offset==NULL, the emulation will return -1 immediately. If, OTOH,
the fd supports lseek, then no data will be lost, due to the lseek()
call at the end.
Bruno