diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2012-03-12 18:36:52 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2012-03-12 18:36:52 -0700 |
commit | 75bef5b488245467b6638e25cd22006b306e8536 (patch) | |
tree | 3aa9f941285be812431131023b9ae00796d2f95c /src | |
parent | 8ab1833a80a18131d897f6d9965545c16acef921 (diff) |
Revert "Treat unexpected returned events from poll as errors"
This commit caused regressions:
https://bugs.freedesktop.org/show_bug.cgi?id=47203
https://bugs.freedesktop.org/show_bug.cgi?id=47216
This reverts commit 70bb9e28d37fff4ead4d0a2c672af77059765fa4.
Diffstat (limited to 'src')
-rw-r--r-- | src/NextEvent.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/NextEvent.c b/src/NextEvent.c index c8c9dd5..b1f7bc7 100644 --- a/src/NextEvent.c +++ b/src/NextEvent.c @@ -356,21 +356,7 @@ static int IoWait ( return Select (wf->nfds, &wf->rmask, &wf->wmask, &wf->emask, wt->wait_time_ptr); #else - int ret = poll (wf->fdlist, wf->fdlistlen, wt->poll_wait); - /* If poll() returns an event we didn't expect, such as POLLNVAL, treat - * it as if it failed. */ - if(ret >= 0) { - nfds_t i; - for (i=0; i < wf->fdlistlen; i++) { - struct pollfd *fd = &wf->fdlist[i]; - if (fd->revents & ~fd->events) { - ret = -1; - errno = EIO; - break; - } - } - } - return ret; + return poll (wf->fdlist, wf->fdlistlen, wt->poll_wait); #endif } |