Need to restart the epoll_wait() if it returns -1 with EINTR. Maybe worth ensuring that it behaves nicely when run interactively, although that's less of a concern.