Actions
Feature #13362
closed[PATCH] socket: avoid fcntl for read/write_nonblock on Linux
Feature #13362:
[PATCH] socket: avoid fcntl for read/write_nonblock on Linux
Status:
Closed
Assignee:
-
Target version:
-
Description
On platforms where MSG_DONTWAIT works reliably on all sockets
(so far, I know of Linux), we can avoid fcntl syscalls and
implement IO#write_nonblock and IO#read_nonblock in terms of the
socket-specific send and recv family of syscalls.
This avoids side effects on the socket, and also encourages
generic code to be written in cases where IO wrappers like
OpenSSL::SSL::SSLSocket are used.
I could've sworn I sent something like this years ago, but
maybe I'm confusing it with kgio or socket_dontwait.
Files
Actions