X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2804f77d88eb478f85a281b19d87e38cd96e0d0c..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/unix/epolldispatcher.cpp diff --git a/src/unix/epolldispatcher.cpp b/src/unix/epolldispatcher.cpp index cd57f12411..7cc46b39b0 100644 --- a/src/unix/epolldispatcher.cpp +++ b/src/unix/epolldispatcher.cpp @@ -189,11 +189,15 @@ void wxEpollDispatcher::Dispatch(int timeout) continue; } - if ( p->events & EPOLLIN ) + // note that for compatibility with wxSelectDispatcher we call + // OnReadWaiting() on EPOLLHUP as this is what epoll_wait() returns + // when the write end of a pipe is closed while with select() the + // remaining pipe end becomes ready for reading when this happens + if ( p->events & (EPOLLIN | EPOLLHUP) ) handler->OnReadWaiting(); else if ( p->events & EPOLLOUT ) handler->OnWriteWaiting(); - else if ( p->events & (EPOLLERR | EPOLLHUP) ) + else if ( p->events & EPOLLERR ) handler->OnExceptionWaiting(); } }