diff --git a/man2/recv.2 b/man2/recv.2 index eededb2f8..6be8eab91 100644 --- a/man2/recv.2 +++ b/man2/recv.2 @@ -100,7 +100,7 @@ received from (see .PP If no messages are available at the socket, the receive calls wait for a message to arrive, unless the socket is nonblocking (see -.BR fcntl (2)) +.BR fcntl (2)), in which case the value \-1 is returned and the external variable .I errno set to @@ -122,6 +122,15 @@ call is formed by .IR OR 'ing one or more of the following values: .TP +.B MSG_DONTWAIT +Enables non-blocking operation; if the operation would block, +.B EAGAIN +is returned (this can also be enabled using the +.B O_NONBLOCK +with the +.B F_SETFL +.BR fcntl (2)). +.TP .B MSG_ERRQUEUE This flag specifies that queued errors should be received from the socket error queue. @@ -334,15 +343,6 @@ is returned to indicate that expedited or out-of-band data were received. .B MSG_ERRQUEUE indicates that no data was received but an extended error from the socket error queue. -.TP -.B MSG_DONTWAIT -Enables non-blocking operation; if the operation would block, -.B EAGAIN -is returned (this can also be enabled using the -.B O_NONBLOCK -with the -.B F_SETFL -.BR fcntl (2)). .SH "RETURN VALUE" These calls return the number of bytes received, or \-1 if an error occurred. The return value will be 0 when the