mirror of https://github.com/macssh/macssh.git
update GUSI 2.1.6
This commit is contained in:
parent
d900a6d4b0
commit
c76691e390
Binary file not shown.
|
@ -904,7 +904,12 @@ int select(int width, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, stru
|
|||
&readres, &writeres, &exceptres);
|
||||
GUSIContext::Yield(kGUSIYield);
|
||||
}
|
||||
// This loop is pretty much guaranteed to set [[errno]] to [[EBADF]], so we
|
||||
// save the actual error code and restore it (this is harmless if no error
|
||||
// occurred).
|
||||
//
|
||||
// <Call [[post_select]] for all file descriptors>=
|
||||
int saveErrno = errno;
|
||||
for (int s = 0; s < width ; ++s)
|
||||
if (GUSISocket * sock = GUSIDescriptorTable::LookupSocket(s)) {
|
||||
bool r = readfds && FD_ISSET(s,readfds);
|
||||
|
@ -914,6 +919,7 @@ int select(int width, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, stru
|
|||
if (r || w || e)
|
||||
sock->post_select(r, w, e);
|
||||
}
|
||||
errno = saveErrno;
|
||||
// <Copy internal descriptor sets to parameters>=
|
||||
if (readfds)
|
||||
*readfds = readres;
|
||||
|
|
Loading…
Reference in New Issue