emulate select via epoll_wait