Linux has `epoll` which is a efficient way of polling for changes on file descriptors.