]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/epolldispatcher.cpp
VC6 compilation fix: using access declaration can only be used with immediate base...
[wxWidgets.git] / src / unix / epolldispatcher.cpp
index cd57f124118cb979f1145dbcce662fc645ab8ba0..7cc46b39b0b6a8d222c10e803d817a2055280d26 100644 (file)
@@ -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();
     }
 }