You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in io_epoll_context implies that readv and writev syscalls error codes are returned as different negative values. Instead, they always return -1, and actual error code is returned through errno variable. The only reason it currently works (even though it always adds fds to epoll even if there's an unrecoverable error, not just EAGAIN, never calling set_error in start_io, and calling set_error with EPERM in case of ANY error, hiding it) is because it compares return code with -EPERM, which turns out to be -1 on Linux, and adds such descriptors to epoll. I wonder where the idea of this check comes from, cause adding such descriptor to epoll wouldn't fix real EPERM error...
The text was updated successfully, but these errors were encountered:
The code in io_epoll_context implies that
readv
andwritev
syscalls error codes are returned as different negative values. Instead, they always return -1, and actual error code is returned througherrno
variable. The only reason it currently works (even though it always adds fds toepoll
even if there's an unrecoverable error, not justEAGAIN
, never callingset_error
instart_io
, and callingset_error
withEPERM
in case of ANY error, hiding it) is because it compares return code with-EPERM
, which turns out to be -1 on Linux, and adds such descriptors toepoll
. I wonder where the idea of this check comes from, cause adding such descriptor toepoll
wouldn't fix realEPERM
error...The text was updated successfully, but these errors were encountered: