diff --git a/man2/recv.2 b/man2/recv.2 index 884862a5e..45dba6b1d 100644 --- a/man2/recv.2 +++ b/man2/recv.2 @@ -403,8 +403,16 @@ if an error occurred. In the event of an error, .I errno is set to indicate the error. -The return value will be 0 when the -peer has performed an orderly shutdown. + +When a stream socket peer has performed an orderly shutdown, +the return value will be 0 (the traditional "end-of-file" return). + +Datagram sockets in various domains (e.g., the UNIX and Internet domains) +permit zero-length datagrams. +When such a datagram is received, the return value is 0. + +The value 0 may also be returned if the requested number of bytes +to receive from a stream socket was 0. .SH ERRORS These are some standard errors generated by the socket layer. Additional errors