diff options
| author | Felix Johnson <fjohnson@felix-johnson.com> | 2025-02-13 03:40:59 +0000 |
|---|---|---|
| committer | Alexander Ziaee <ziaee@FreeBSD.org> | 2025-02-27 01:44:28 +0000 |
| commit | 2200da5fe05929d8455435a178188efaab7ee85f (patch) | |
| tree | c0d1c1fe7040eed685b82a46e5460791ad4c22cd /lib/libc | |
| parent | 77eacf8278036353ead50e1317f8936dfc49186d (diff) | |
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/sys/recv.2 | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2 index 68dc70e14800..8d50086c3eb9 100644 --- a/lib/libc/sys/recv.2 +++ b/lib/libc/sys/recv.2 @@ -318,12 +318,19 @@ On data reception the .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 |
