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


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


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