Why does select.select() work with disk files but not epoll()? Why does select.select() work with disk files but not epoll()? unix unix

Why does select.select() work with disk files but not epoll()?


select allows filedescriptors pointing to regular files to be monitored, however it will always report a file as readable/writable (i.e. it's somewhat useless, as it doesn't tell you whether a read/write would actually block).

epoll just disallows monitoring of regular files, as it has no mechanism (on linux at least) available to tell whether reading/writing a regular file would block