refactor epoll setup out of inputLoop