From: bugzilla-daemon@kernel.org
To: linux-man@vger.kernel.org
Subject: [Bug 220578] New: [recv(2) man page] MSG_PEEK doesn't always return the same data
Date: Mon, 15 Sep 2025 21:11:40 +0000 [thread overview]
Message-ID: <bug-220578-11311@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=220578
Bug ID: 220578
Summary: [recv(2) man page] MSG_PEEK doesn't always return the
same data
Product: Documentation
Version: unspecified
Hardware: AMD
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: documentation_man-pages@kernel-bugs.osdl.org
Reporter: alanas.00+k@mail.ru
Regression: No
Created attachment 308681
--> https://bugzilla.kernel.org/attachment.cgi?id=308681&action=edit
c source code of test program (uses unix socketpair)
recv(2) man page text:
MSG_PEEK
This flag causes the receive operation to return data from the beginning of the
receive queue without removing that data from the queue. Thus, a subsequent
receive call will return the same data.
but for unix sockets and local tcp sockets the "Thus, a subsequent receive call
will return the same data." part is not always true
if data was written using sendfile, writing to file that was used as in_fd
argument in sendfile changes what data recv returns
tested on 2 operating systems:
kde neon unstable, uname -r -v -m -p -i -o: 6.14.0-29-generic
#29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Aug 14 16:52:50 UTC 2 x86_64 x86_64
x86_64 GNU/Linux
opensuse tumbleweed, uname -r -v -m -p -i -o: 6.16.5-1-default #1 SMP
PREEMPT_DYNAMIC Thu Sep 4 15:51:43 UTC 2025 (642f24d) x86_64 x86_64 x86_64
GNU/Linux
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
reply other threads:[~2025-09-15 21:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-220578-11311@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox