projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
btowc: fix missing file
[gnulib.git]
/
lib
/
select.c
diff --git
a/lib/select.c
b/lib/select.c
index
de4e3b4
..
bc02266
100644
(file)
--- a/
lib/select.c
+++ b/
lib/select.c
@@
-1,7
+1,7
@@
/* Emulation for select(2)
Contributed by Paolo Bonzini.
/* Emulation for select(2)
Contributed by Paolo Bonzini.
- Copyright 2008-20
09
Free Software Foundation, Inc.
+ Copyright 2008-20
10
Free Software Foundation, Inc.
This file is part of gnulib.
This file is part of gnulib.
@@
-80,7
+80,7
@@
typedef DWORD (WINAPI *PNtQueryInformationFile)
#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
static BOOL
#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
static BOOL
-IsSocketHandle(HANDLE h)
+IsSocketHandle
(HANDLE h)
{
WSANETWORKEVENTS ev;
{
WSANETWORKEVENTS ev;
@@
-132,6
+132,8
@@
win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits,
if (avail)
read = TRUE;
}
if (avail)
read = TRUE;
}
+ else if (GetLastError () == ERROR_BROKEN_PIPE)
+ ;
else
{
else
{
@@
-246,7
+248,7
@@
rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
wait_timeout = INFINITE;
else
{
wait_timeout = INFINITE;
else
{
- wait_timeout = timeout->tv_sec + timeout->tv_usec / 1000;
+ wait_timeout = timeout->tv_sec
* 1000
+ timeout->tv_usec / 1000;
/* select is also used as a portable usleep. */
if (!rfds && !wfds && !xfds)
/* select is also used as a portable usleep. */
if (!rfds && !wfds && !xfds)