summaryrefslogtreecommitdiffstats
path: root/tokio/src/macros
diff options
context:
space:
mode:
authorKevin Leimkuhler <kevin@kleimkuhler.com>2020-02-25 13:27:44 -0800
committerGitHub <noreply@github.com>2020-02-25 13:27:44 -0800
commit10f1507cf44b62f4b126ecdd28351e4a4a1ce3f7 (patch)
tree894d55b06d40eec7c1a23da33d8c05d410a892b2 /tokio/src/macros
parentb9cc032d3bcf7686f0130163c13d3d660d30ae2c (diff)
process: Wake up read and write on `EPOLLERR` (#2218)
## Motivation #2174 On epoll platforms, the read end of a pipe closing is signaled to the write end through the `EPOLLERR` event [[1](http://man7.org/linux/man-pages/man2/epoll_ctl.2.html)]. If readiness is not registered for this event, it will silently pass through `epoll_wait` calls. Additionally, this specific case that `EPOLLERR` is triggered leaves the write end of the pipe (parent process) waiting for a wakeup that never occurs. ## Solution Similar to the `HUP` event on Unix platforms, errors are now always masked through registrations so that both read and write ends of a connection are made aware of errors. In cases where pipes are used and the read end closes, write ends that are waiting for a wakeup are properly notified and try to write again. This allows a client to observe `BrokenPipe` and go through the proper cleanup and/or restablishment of connection. Closes #2174 Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Diffstat (limited to 'tokio/src/macros')
0 files changed, 0 insertions, 0 deletions