Re: [PATCH] Add preadv2/pwritev2 documentation.

Andrew Morton
2015-03-27T16:48:24Z

On Mon, 16 Mar 2015 14:32:26 -0400 Milosz Tanski <milosz@adfin.com> wrote:

> +.BR pwritev2 ()
> can also fail for the same reasons as
> .BR lseek (2).
> -Additionally, the following error is defined:
> +Additionally, the following errors are defined:
> +.TP
> +.B EAGAIN
> +The operation would block. This is possible if the file descriptor \fIfd\fP refers to a socket and has been marked nonblocking
> +.RB ( O_NONBLOCK ),
> +or the operation is a
> +.BR preadv2
> +and the \fIflags\fP argument is set to
> +.BR RWF_NONBLOCK.

Can you please expand on this to describe the circumstances in which
pread2() returns -EAGAIN? Let's fix up the short-read confusion.

And let's have a think about EAGAIN vs EWOULDBLOCK.