drb: avoid redundant fcntl call
Sockets are close-on-exec by default since Ruby 2.0, so it is redundant to set it again. * lib/drb/drb.rb (set_sockopt): remove redundant fcntl call * lib/drb/unix.rb (set_sockopt): ditto [ruby-core:69128] [Feature #11137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a98f72f20c
commit
46ad38a44d
@ -1,3 +1,9 @@
|
|||||||
|
Wed May 27 09:27:30 2015 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
|
* lib/drb/drb.rb (set_sockopt): remove redundant fcntl call
|
||||||
|
* lib/drb/unix.rb (set_sockopt): ditto
|
||||||
|
[ruby-core:69128] [Feature #11137]
|
||||||
|
|
||||||
Tue May 26 22:10:43 2015 Shugo Maeda <shugo@ruby-lang.org>
|
Tue May 26 22:10:43 2015 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* vm_method.c (rb_alias): should resolve refined methods.
|
* vm_method.c (rb_alias): should resolve refined methods.
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
|
|
||||||
require 'socket'
|
require 'socket'
|
||||||
require 'thread'
|
require 'thread'
|
||||||
require 'fcntl'
|
|
||||||
require 'io/wait'
|
require 'io/wait'
|
||||||
require 'drb/eq'
|
require 'drb/eq'
|
||||||
|
|
||||||
@ -1013,7 +1012,6 @@ module DRb
|
|||||||
|
|
||||||
def set_sockopt(soc) # :nodoc:
|
def set_sockopt(soc) # :nodoc:
|
||||||
soc.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
soc.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
||||||
soc.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::FD_CLOEXEC
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ module DRb
|
|||||||
end
|
end
|
||||||
|
|
||||||
def set_sockopt(soc)
|
def set_sockopt(soc)
|
||||||
soc.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::FD_CLOEXEC
|
# no-op for now
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user