diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index eeabc7b66..0923a1c9c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2012-06-09 Christopher Faylor + + * select.cc (cygwin_select): Remove select_timeout test. + (select_stuff::wait): Return select_set_zero on timeout. + (thread_socket): Report timeout when debugging. + 2012-06-05 Yaakov Selkowitz * include/elf.h: Update from FreeBSD. diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b9f79e8b5..2d00e7c96 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -168,9 +168,7 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, else res = sel.wait (r, w, e, ms); /* wait for an fd to become become active or time out */ - if (res == select_stuff::select_timeout) - res = 0; /* No fd's were active. */ - else if (res >= 0) + if (res >= 0) { copyfd_set (readfds, r, maxfds); copyfd_set (writefds, w, maxfds); @@ -383,7 +381,7 @@ next_while:; break; case WAIT_TIMEOUT: select_printf ("timed out"); - res = select_timeout; + res = select_set_zero; break; case WAIT_OBJECT_0 + 1: if (startfds > 1) @@ -1305,7 +1303,7 @@ thread_socket (void *arg) / MAXIMUM_WAIT_OBJECTS)); bool event = false; - select_printf ("stuff_start %p", si->start); + select_printf ("stuff_start %p, timeout %u", si->start, timeout); while (!event) { for (select_record *s = si->start; (s = s->next); ) diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h index 9e09582c1..0afccbd9d 100644 --- a/winsup/cygwin/select.h +++ b/winsup/cygwin/select.h @@ -71,7 +71,6 @@ class select_stuff public: enum wait_states { - select_timeout = -4, select_signalled = -3, select_loop = -2, select_error = -1,