Bug 108041

Summary: epoll with regular file
Product: Other Reporter: Teodori Serge (teodori.serge)
Component: OtherAssignee: other_other
Status: NEW ---    
Severity: enhancement    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: all Subsystem:
Regression: No Bisected commit-id:

Description Teodori Serge 2015-11-17 09:32:45 UTC
'epoll_ctl' on a regular file returns EPERM. Epolling on a regular file should be possible. If a file was opened as O_WRONLY or O_RDWR, EPOLLOUT should be returned as long as there is space availbale in the file system or the quota was not reached. If a file was opened as O_RDONLY or O_RDWR, EPOLLIN should be returned as long as EOF was not reached or the file expanded so that current position is not at EOF. I came across that, while I was developping a module for a program. That program opens the module and tries to register a descriptor returned by a module function. Sure it would be easier to say, if EPERM is returned, the descriptor is always read or write ready.