4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-18 12:29:32 +08:00
This commit is contained in:
Christopher Faylor 2001-08-28 20:39:22 +00:00
parent ffe94510f5
commit 955dfa520a

View File

@ -168,8 +168,7 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
/* Degenerate case. No fds to wait for. Just wait. */ /* Degenerate case. No fds to wait for. Just wait. */
if (sel.start.next == NULL) if (sel.start.next == NULL)
{ {
if (readfds != dummy_readfds && writefds != dummy_writefds && exceptfds != dummy_exceptfds && if (WaitForSingleObject (signal_arrived, ms) == WAIT_OBJECT_0)
WaitForSingleObject (signal_arrived, ms) == WAIT_OBJECT_0)
{ {
select_printf ("signal received"); select_printf ("signal received");
set_sig_errno (EINTR); set_sig_errno (EINTR);
@ -481,12 +480,9 @@ static int
poll_pipe (select_record *me, fd_set *readfds, fd_set *writefds, poll_pipe (select_record *me, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds) fd_set *exceptfds)
{ {
int doit = me->read_ready || me->write_ready || me->except_ready; return peek_pipe (me, 0) ?
set_bits (me, readfds, writefds, exceptfds) :
if (!doit) 0;
peek_pipe (me, 0);
return doit ? set_bits (me, readfds, writefds, exceptfds) : 0;
} }
MAKEready(pipe) MAKEready(pipe)
@ -1192,12 +1188,9 @@ static int
poll_socket (select_record *me, fd_set *readfds, fd_set *writefds, poll_socket (select_record *me, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds) fd_set *exceptfds)
{ {
int doit = me->read_ready || me->write_ready || me->except_ready; return peek_socket (me, 0) ?
set_bits (me, readfds, writefds, exceptfds) :
if (!doit) 0;
peek_socket (me, 0);
return doit ? set_bits (me, readfds, writefds, exceptfds) : 0;
} }
MAKEready (socket) MAKEready (socket)