Bug 174581 - man page of recvmsg(2) does not mention return value 0
Summary: man page of recvmsg(2) does not mention return value 0
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexander Ziaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-19 21:40 UTC by Philip Withnall
Modified: 2025-02-14 20:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Withnall 2012-12-19 21:40:00 UTC
The man page of recvmsg(2) does not mention that recvmsg() can legitimately return 0 in the case that the socket has closed and no received data is pending.

See the RETURN VALUE section in SUSv2: http://pubs.opengroup.org/onlinepubs/007908799/xns/recvmsg.html

How-To-Repeat: man recvmsg
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:23 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-02-13 03:58:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=571df2c64a3c1af1fe011303ec08e391e887ecbc

commit 571df2c64a3c1af1fe011303ec08e391e887ecbc
Author:     Felix Johnson <fjohnson@felix-johnson.com>
AuthorDate: 2025-02-13 03:40:59 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-02-13 03:54:14 +0000

    recv.2: Explain how recv functions can return 0

    Clarify the RETURN VALUES section with improved structure,
    the condition of the return value 0, and the setting of errno.

    PR:                     174581
    Reviewed by:            jhb, ziaee
    Approved by:            mhorne (mentor)
    Differential Revision:  https://reviews.freebsd.org/D48955

 lib/libsys/recv.2 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)