linux: handle exclusive POLLHUP with UV_DISCONNECT
In commitc7c8e916b8(poll: add UV_DISCONNECT event, 2016-01-11) we forgot to update the workaround added by commit24bfef2ef4(linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT, 2013-11-08). On linux-sparc64, epoll returns just POLLHUP during part of our `poll_duplex` and `poll_unidirectional` tests, triggering the need for the workaround to recognize UV_DISCONNECT. Fixes: https://github.com/libuv/libuv/issues/1859 PR-URL: https://github.com/libuv/libuv/pull/1896 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
52cce6a4c0
commit
06cb00c84f
@ -388,7 +388,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
|
||||
* free when we switch over to edge-triggered I/O.
|
||||
*/
|
||||
if (pe->events == POLLERR || pe->events == POLLHUP)
|
||||
pe->events |= w->pevents & (POLLIN | POLLOUT | UV__POLLPRI);
|
||||
pe->events |=
|
||||
w->pevents & (POLLIN | POLLOUT | UV__POLLRDHUP | UV__POLLPRI);
|
||||
|
||||
if (pe->events != 0) {
|
||||
/* Run signal watchers last. This also affects child process watchers
|
||||
|
||||
Loading…
Reference in New Issue
Block a user