+ // TODO: we need to restart select() in this case but for now just return
+ // as if timeout expired
+ if ( ret == -1 && errno == EINTR )
+ ret = 0;
+
+ return ret;
+}
+
+bool wxSelectDispatcher::HasPending() const
+{
+ wxSelectSets sets(m_sets);
+ return DoSelect(sets, 0) > 0;
+}
+
+int wxSelectDispatcher::Dispatch(int timeout)
+{
+ wxSelectSets sets(m_sets);
+ switch ( DoSelect(sets, timeout) )