Project

General

Profile

Actions

Feature #13362

closed

[PATCH] socket: avoid fcntl for read/write_nonblock on Linux

Added by normalperson (Eric Wong) about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:80302]

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0