readv() return and errno
From [email protected] Tue Mar 26 18:13:40 2002
Doesn't seem confusing at all.
RETURN VALUE
On success readv returns the number of bytes read. On
success writev returns the number of bytes written. On
error, -1 is returned, and errno is set appropriately.
ERRORS
EINVAL An invalid argument was given. For instance count
might be greater than MAX_IOVEC, or zero. fd could also be attached to an object which is unsuit- able for reading (for readv) or writing (for writev).
I don't see much in the way of waffle words. If count is greater than MAX_IOVEC or zero you get EINVAL.
Yes, without hesitation you choose the wrong interpretation. That is why I explained in so much detail what the right interpretation is. Since you perhaps still do not understand, let me reiterate:
The above ERRORS section says: In case this call returns EINVAL one of the possible reasons is that an invalid argument was given. There do exist Unix-like systems (not necessarily Linux) that consider a zero count invalid.
Andries
Quoted 4 lines
The above ERRORS section says: In case this call returns EINVAL one of the possible reasons is that an invalid argument was given. There do exist Unix-like systems (not necessarily Linux) that consider a zero count invalid.
Got me as well - by that meaning you are correct - the man page is only wrong for ssize_t type stuff.
Sorry
Alan