* select.cc (cygwin_select): Fifth time is the charm.

This commit is contained in:
Christopher Faylor 2011-12-09 03:19:41 +00:00
parent 9b80fa0f92
commit 8714982cef
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2011-12-08 Christopher Faylor <me.cygwin2011@cgf.cx>
* select.cc (cygwin_select): Fifth time is the charm.
2011-12-08 Christopher Faylor <me.cygwin2011@cgf.cx>
* select.cc (cygwin_select): Make sure that 0 is returned when sel.wait

View File

@ -143,11 +143,14 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
pthread::static_cancel_self ();
/*NOTREACHED*/
default:
res = 0;
res = 1;
break;
}
else if ((sel.always_ready || ms == 0)
|| (res = sel.wait (r, w, e, ms)) >= 0)
else if (sel.always_ready || ms == 0)
res = 0;
else
res = sel.wait (r, w, e, ms);
if (res >= 0)
{
copyfd_set (readfds, r, maxfds);
copyfd_set (writefds, w, maxfds);