Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
e469c249
Commit
e469c249
authored
Jan 22, 2019
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around poll() bug on MacOS:
https://openradar.appspot.com/37537852
parent
a90c65f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
async-unix.c++
c++/src/kj/async-unix.c++
+10
-1
No files found.
c++/src/kj/async-unix.c++
View file @
e469c249
...
...
@@ -695,7 +695,16 @@ void UnixEventPort::FdObserver::fire(short events) {
short
UnixEventPort
::
FdObserver
::
getEventMask
()
{
return
(
readFulfiller
==
nullptr
?
0
:
(
POLLIN
|
POLLRDHUP
))
|
(
writeFulfiller
==
nullptr
?
0
:
POLLOUT
)
|
(
urgentFulfiller
==
nullptr
?
0
:
POLLPRI
);
(
urgentFulfiller
==
nullptr
?
0
:
POLLPRI
)
|
// The POSIX standard says POLLHUP and POLLERR will be reported even if not requested.
// But on MacOS, if `events` is 0, then POLLHUP apparently will not be reported:
// https://openradar.appspot.com/37537852
// It seems that by settingc any non-zero value -- even one documented as ignored -- we
// cause POLLHUP to be reported. Both POLLHUP and POLLERR are documented as being ignored.
// So, we'll go ahead and set them. This has no effect on non-broken OSs, causes MacOS to
// do the right thing, and sort of looks as if we're explicitly requesting notification of
// these two conditions, which we do after all want to know about.
POLLHUP
|
POLLERR
;
}
Promise
<
void
>
UnixEventPort
::
FdObserver
::
whenBecomesReadable
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment