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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-12-04 00:28:55 +0400
committerChristopher Faylor <me@cgf.cx>2013-12-04 00:28:55 +0400
commit4bf6a52173d6e552359c8f5f1fcd0861d22d64af (patch)
tree1a64220de626aa8286c85b248b2559c33e8837c5 /winsup
parentd7f07b3ddebfc22c1584edc7a1e982d4fdef7ca4 (diff)
* select.cc (select): Add workaround for, as yet undebugged, pathological case.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/select.cc9
2 files changed, 11 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d8d60b863..89dce26f6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-03 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * select.cc (select): Add workaround for, as yet undebugged,
+ pathological case.
+
2013-12-01 Christopher Faylor <me.cygwin2013@cgf.cx>
* dtable.cc (dtable::find_unused_handle): Break out of the right loop.
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 7dd17f395..e923f9161 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -189,8 +189,11 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
copyfd_set (readfds, r, maxfds);
copyfd_set (writefds, w, maxfds);
copyfd_set (exceptfds, e, maxfds);
- /* Actually set the bit mask from sel records */
- res = (res == select_stuff::select_set_zero) ? 0 : sel.poll (readfds, writefds, exceptfds);
+ if (res == select_stuff::select_set_zero)
+ res = 0;
+ else
+ /* Set the bit mask from sel records */
+ res = sel.poll (readfds, writefds, exceptfds) ?: select_stuff::select_loop;
}
/* Always clean up everything here. If we're looping then build it
all up again. */
@@ -389,7 +392,7 @@ next_while:;
wait_ret = MsgWaitForMultipleObjectsEx (m, w4, ms,
QS_ALLINPUT | QS_ALLPOSTMESSAGE,
MWMO_INPUTAVAILABLE);
- select_printf ("wait_ret %d. verifying", wait_ret);
+ select_printf ("wait_ret %d, m = %d. verifying", wait_ret, m);
wait_states res;
switch (wait_ret)