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
times out.
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);