Created attachment 909619 [details] Exercise fionread behavior Description of problem: The unix(7) man page has an incorrect description of behavior for SIOCINQ/FIONREAD. It states that the return value is the "amount of queued unread data in the receive buffer". That is true only for sockets of type SOCK_STREAM. For SOCK_DGRAM, the return value is the size of the next queued packet available to be read. If there are multiple packets queued in the receive buffer, it returns the length of the next packet to be read, not the total amount of queued unread data (i.e. all packets). Version-Release number of selected component (if applicable): Fedora 20 How reproducible: 100% Steps to Reproduce: I have attached (a tarball of) two programs to demonstrate the SOCK_DGRAM behavior. 1. Run test_fionread, but don't type anything yet 2. (on the same host) Run test_sendto, and type in several lines, each of which will be sent in individual packets and queued to be read. 3. Go back to test_fionread, and press "Return" to cause the reads to begin. You will see that FIONREAD will report the length of each queued packet before reading it, even though there are multiple queued packets and total queued data is larger. Additional info: Please correct the man page, rather than changing the behavior of FIONREAD to match the man page. If you compare to the udp(7) man page description of FIONREAD you will see that the Unix SOCK_DGRAM behavior matches that description. You might simply borrow that text for the SOCK_DGRAM description.
Note the behavior I describe above *probably* also applies to SOCK_SEQPACKET sockets, but I haven't tested that. Should touch up man page text appropriately for both SOCK_DGRAM and SOCK_SEQPACKET.
Solving in thread: http://www.spinics.net/lists/linux-man/msg06478.html
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Hi Bob, sorry about the delay. The patch was already merged in upstream for some time. f20: https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20150525/1582897.html 21: https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20150525/1582898.html
man-pages-3.69-4.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/man-pages-3.69-4.fc21
man-pages-3.53-6.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/man-pages-3.53-6.fc20
Package man-pages-3.69-4.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing man-pages-3.69-4.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-9258/man-pages-3.69-4.fc21 then log in and leave karma (feedback).
man-pages-3.53-6.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
man-pages-3.69-4.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.