projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoupdate
[gnulib.git]
/
lib
/
poll.c
diff --git
a/lib/poll.c
b/lib/poll.c
index
90d99d9
..
7c52cb6
100644
(file)
--- a/
lib/poll.c
+++ b/
lib/poll.c
@@
-70,7
+70,7
@@
#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;
@@
-150,6
+150,8
@@
win32_compute_revents (HANDLE h, int *p_sought)
if (avail)
happened |= *p_sought & (POLLIN | POLLRDNORM);
}
if (avail)
happened |= *p_sought & (POLLIN | POLLRDNORM);
}
+ else if (GetLastError () == ERROR_BROKEN_PIPE)
+ happened |= POLLHUP;
else
{
else
{
@@
-503,7
+505,7
@@
poll (pfd, nfd, timeout)
if (sought)
handle_array[nhandles++] = h;
if (pfd[i].revents)
if (sought)
handle_array[nhandles++] = h;
if (pfd[i].revents)
-
wait_
timeout = 0;
+ timeout = 0;
}
}
}
}