make epoll_watch a bit more generic