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!
== poll emulation == Many applications that run on systems without poll will attempt to emulate it using the select function. A naive emulation works like this: * Map pollfds with POLLIN to select's readfds * Map pollfds with POLLOUT to select's writefds * Map pollfds with POLLPRI to select's errorfds * Call select * Map the readfds to the pollfds POLLIN return events * Map the writefds to the pollfds POLLIN return events * Map the errorfds to the pollfds POLLPRI return events This has two problems: * POLLHUP and POLLERR are not returned * pollfds with no events are not mapped at all Usually select will trigger a read event if the socket closes, so POLLHUP can be emulated using a peek. But this doesn't work if a pollfd has no events at all to check.
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)