Am Wed, 2 Jun 2021 08:30:08 +0200 schrieb Juergen Gross : > On 01.06.21 18:10, Olaf Hering wrote: > > +int readv_exact(int fd, const struct iovec *iov, int iovcnt) > > + if ( len <= 0 ) > > + { > > + rc = -1; > Is EOF really an error? I think yes, that's what "exact" implies IMO. > This will stop the loop, even if idx hasn't reached iovcnt. Yes, it will trigger yet another readv(). The "while" might be a leftover from a variant which used repeated read_exact to finish the function. It should become a "if", and the "len = 0" can be removed. Olaf