Why does select.select() work with disk files but not epoll()?
问题 The following code essentially cats a file with select.select(): f = open('node.py') fd = f.fileno() while True: r, w, e = select.select([fd], [], []) print '>', repr(os.read(fd, 10)) time.sleep(1) When I try a similar thing with epoll I get an error: self._impl.register(fd, events | self.ERROR) IOError: [Errno 1] Operation not permitted I've also read that epoll does not support disk files -- or perhaps that it doesn't make sense. Epoll on regular files But why does select() support disk