This is the mail archive of the
cygwin-developers@sources.redhat.com
mailing list for the Cygwin project.
poll() fix
- To: "'cygwin-developers at sourceware dot cygnus dot com'" <cygwin-developers at sourceware dot cygnus dot com>
- Subject: poll() fix
- From: "Fifer, Eric" <EFifer at sanwaint dot com>
- Date: Mon, 17 Jul 2000 17:59:05 +0100
I think that the tests checking the results returned
from cygwin_select should not be negated.
Regards,
Eric Fifer
ChangeLog
* poll.cc (poll): Fix erroneous negations.
--- poll.cc- Mon Jul 17 16:52:15 2000
+++ poll.cc Mon Jul 17 16:53:57 2000
@@ -51,11 +51,11 @@ poll (struct pollfd *fds, unsigned int n
else
{
fds[i].revents = 0;
- if (!FD_ISSET (fds[i].fd, &read_fds))
+ if (FD_ISSET (fds[i].fd, &read_fds))
fds[i].revents |= POLLIN;
- if (!FD_ISSET (fds[i].fd, &write_fds))
+ if (FD_ISSET (fds[i].fd, &write_fds))
fds[i].revents |= POLLOUT;
- if (!FD_ISSET (fds[i].fd, &except_fds))
+ if (FD_ISSET (fds[i].fd, &except_fds))
fds[i].revents |= POLLPRI;
}
}