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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-25 01:19:14 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-25 01:19:14 +0400
commita3cfd73ac9146404bc5fc4f44a832aa99749211c (patch)
tree23aa6449d1a1529dac1737fec41d865ed13160b4 /winsup/cygwin/select.cc
parentbe8924c43b66349bdf7d760fc73d779db6f0bcee (diff)
* select.cc (cygwin_select): Correct logic for "always_ready" fds or when there
is no wait specified. * syslog.cc (pass_handler::set_message): Zero the buffer prior to setting it.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 99c321b66..2b0bd2d6b 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -173,8 +173,9 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
fd_set *w = allocfd_set (maxfds);
fd_set *e = allocfd_set (maxfds);
- /* Don't bother waiting if one of the selected fds is "always ready". */
- if ((!sel.always_ready || ms != 0) && sel.wait (r, w, e, ms))
+ if (sel.always_ready || ms == 0)
+ /* Don't bother waiting. */;
+ else if (sel.wait (r, w, e, ms))
return -1; /* some kind of error */
copyfd_set (readfds, r, maxfds);