diff --git a/lib/libsys/recv.2 b/lib/libsys/recv.2 --- a/lib/libsys/recv.2 +++ b/lib/libsys/recv.2 @@ -316,12 +316,19 @@ .Fa msg_len field is updated to the length of the received message. .Sh RETURN VALUES -These calls except -.Fn recvmmsg +On successful completion, +.Fn recv , +.Fn recvfrom , +and +.Fn recvmsg return the number of bytes received. .Fn recvmmsg returns the number of messages received. -A value of -1 is returned if an error occurred. +If no messages are available to be received and the peer has +performed an orderly shutdown, 0 is returned. +Otherwise, -1 is returned and +.Va errno +is set to indicate the error. .Sh ERRORS The calls fail if: .Bl -tag -width Er