bytedance / monoio

Rust async runtime based on io-uring.
Apache License 2.0
4.03k stars 226 forks source link

`File::from_std` always returns Err with linux legacy driver #276

Closed NKID00 closed 3 months ago

NKID00 commented 4 months ago

Version

latest commit on branch master (dbdb3d8)

Platform

Linux 6.6

Description

monoio::fs::File::from_std always returns Err PermissionDenied for regular file with linux legacy driver, because regular file does not support epoll and this method tries to register it to epoll with SharedFd::new. Switching to SharedFd::new_without_register should solve this problem as in OpenOptions::open.