On 24/06/18 15:40, Bruno Haible wrote: > In afalg_stream, if the stream refers to a regular file, and sendfile() fails, > do we have a guarantee that the offset of the file descriptor remains > unchanged? > > The man page at http://man7.org/linux/man-pages/man2/sendfile.2.html doesn't > say so.
I looked into this last night. My reading was if &off is specified, the offset remains unchanged. "If offset is not NULL, then sendfile() does not modify the file offset of in_fd;" So it doesn't look like this is required. cheers, Pádraig