From: Eric Wong <normalperson@...> Date: 2014-01-18T21:04:40+00:00 Subject: [ruby-core:59853] Re: [ruby-trunk - Feature #9330] [PATCH 0/3] avoid redundant fcntl/fstat syscalls for cloexec sockets akr@fsij.org wrote: > I feel rb_update_max_fd call should be exist near fd allocation site. > If they are far, it is difficult to confirm that rb_update_max_fd is called for all fd allocation. OK. Also, thanks for r44641 (early return from rb_update_max_fd), I think we can drop patch 2/3. How about just 1/3 and 3/3? The following changes since commit 971ef822679dfa6ee63ff83a47b4e4d1aa60d146: * ext/socket: Avoid unnecessary ppoll/select on Linux. Patch by Eric Wong. [ruby-core:57950] [Bug #9039] (2014-01-18 14:13:22 +0000) are available in the git repository at: git://80x24.org/ruby.git socket_cloexec_once-v2 for you to fetch changes up to 205abc14b8ebf84cf9016de260201e3f95044a72: socket: avoid redundant fcntl calls for FD passing (2014-01-18 20:57:14 +0000) ---------------------------------------------------------------- Eric Wong (2): socket: avoid redundant fcntl(fd, F_GETFD) with SOCK_CLOEXEC socket: avoid redundant fcntl calls for FD passing ext/socket/ancdata.c | 9 +++++++-- ext/socket/init.c | 40 ++++++++++++++++++++++++++++++++++------ ext/socket/rubysocket.h | 2 ++ ext/socket/socket.c | 31 ++++++++++++++++++++++--------- ext/socket/unixsocket.c | 10 ++++++++-- 5 files changed, 73 insertions(+), 19 deletions(-)