diff options
author | Christopher Faylor <me@cgf.cx> | 2013-12-03 20:28:55 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-12-03 20:28:55 +0000 |
commit | 4bf6a52173d6e552359c8f5f1fcd0861d22d64af (patch) | |
tree | 1a64220de626aa8286c85b248b2559c33e8837c5 /winsup | |
parent | d7f07b3ddebfc22c1584edc7a1e982d4fdef7ca4 (diff) | |
download | cygnal-4bf6a52173d6e552359c8f5f1fcd0861d22d64af.tar.gz cygnal-4bf6a52173d6e552359c8f5f1fcd0861d22d64af.tar.bz2 cygnal-4bf6a52173d6e552359c8f5f1fcd0861d22d64af.zip |
* select.cc (select): Add workaround for, as yet undebugged, pathological case.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 9 |
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) |