Jump to content
Toggle sidebar
JookWiki
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Navigation
Main page
Recent changes
Random page
All pages
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
Editing
POLLHUP polling
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
More
Read
Edit
Edit source
View history
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== POSIX == POSIX specifies two functions for waiting on multiple file descriptors: * [https://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html select] which originates from the BSD sockets API * [https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html poll] which originates from the System V STREAMS API select doesn't specify anything to do with sockets being closed, so that's not too useful. poll initially looks like it's better but it leaves a lot of questions after reading: * Does POLLHUP apply to sockets? * Can the events field be 0 and still get POLLHUP events? * Under what conditions do we even get return events? I highly recommend trying to read the poll standard and sussing out these details. As far as I can tell nobody has brought up either of these questions during the standards process. At least in these sources: * [https://www.opengroup.org/austin/aardvark/latest/ Aardvark defect reports for The Austin Group Specification] * [https://austingroupbugs.net/view_all_bug_page.php Austin Group Defect Tracker] * [https://www.opengroup.org/austin/docreg.html Austin Group Document Register] * [https://www.mail-archive.com/austin-group-l@opengroup.org/maillist.html austin-group-l mailing list] The only talk of this issue I've found online is the 2001 email "[https://groups.google.com/g/comp.unix.programmer/c/bNNadBIEpTo/m/G5gs1mqNhbIJ poll() and events==0]" which has no clear answers.
Summary:
Please note that all contributions to JookWiki are considered to be released under the Creative Commons Zero (Public Domain) (see
JookWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To edit this page, please answer the question that appears below (
more info
):
Who owns this wiki?
Cancel
Editing help
(opens in new window)