Issue #13362 has been updated by akr (Akira Tanaka).

Status changed from Open to Feedback

I think it's possible on such platforms.

If some non-Ruby application depend on nonblocking flag set by Ruby,
such application will be affected, though.
It is better style that such application set nonblocking flag explicitly.


----------------------------------------
Feature #13362: [PATCH] socket: avoid fcntl for read/write_nonblock on Linux
https://bugs.ruby-lang.org/issues/13362#change-64268

* Author: normalperson (Eric Wong)
* Status: Feedback
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
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--------------------------------
0001-socket-avoid-fcntl-for-read-write_nonblock-on-Linux.patch (3.1 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>