* 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:
@ -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);
|
||||
|
Reference in New Issue
Block a user