public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [Bug 220578] New: [recv(2) man page] MSG_PEEK doesn't always return the same data
@ 2025-09-15 21:11 bugzilla-daemon
  0 siblings, 0 replies; only message in thread
From: bugzilla-daemon @ 2025-09-15 21:11 UTC (permalink / raw)
  To: linux-man

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-15 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15 21:11 [Bug 220578] New: [recv(2) man page] MSG_PEEK doesn't always return the same data bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox