mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix epoll_ctl(2) regular files and dirs
Linux behaves differently for regular files and dirs for poll(2)/select(2) compared to epoll_ctl(2). The latter returns EPERM for file and dirs. I've also changed host FDs to behave like the underlying FD in regards to epoll to keep it compatible with docker. Fixes #7134 PiperOrigin-RevId: 429412692
This commit is contained in:
committed by
gVisor bot
parent
a9b5dcd31b
commit
dfcf798425
@@ -100,6 +100,11 @@ func (s *SocketVFS2) EventUnregister(e *waiter.Entry) {
|
||||
s.socketOpsCommon.EventUnregister(e)
|
||||
}
|
||||
|
||||
// Epollable implements FileDescriptionImpl.Epollable.
|
||||
func (s *SocketVFS2) Epollable() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Read implements vfs.FileDescriptionImpl.
|
||||
func (s *SocketVFS2) Read(ctx context.Context, dst usermem.IOSequence, opts vfs.ReadOptions) (int64, error) {
|
||||
// All flags other than RWF_NOWAIT should be ignored.
|
||||
|
||||
Reference in New Issue
Block a user