* 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.
This commit is contained in:
Christopher Faylor
2000-08-24 21:19:14 +00:00
parent be8924c43b
commit a3cfd73ac9
3 changed files with 18 additions and 10 deletions

View File

@ -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);