Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/poll.cc')
-rw-r--r--winsup/cygwin/poll.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/poll.cc b/winsup/cygwin/poll.cc
index 52c05dd50..4e3028fff 100644
--- a/winsup/cygwin/poll.cc
+++ b/winsup/cygwin/poll.cc
@@ -111,9 +111,11 @@ poll (struct pollfd *fds, unsigned int nfds, int timeout)
Unfortunately, recvfrom() doesn't make much
sense then. It returns WSAENOTCONN in that
case. Since that's not actually an error,
- we must not set POLLERR. */
+ we must not set POLLERR but POLLIN. */
if (WSAGetLastError () != WSAENOTCONN)
fds[i].revents |= POLLERR;
+ else
+ fds[i].revents |= POLLIN;
break;
case 0: /* Closed on the read side. */
fds[i].revents |= POLLHUP;