1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/resolv.rb: Don't set CLOEXEC flag explicitly. (Ruby set it by

default.)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-02-08 06:42:28 +00:00
parent 25a89ac0ac
commit 5323328f0c
2 changed files with 5 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Sat Feb 8 15:41:37 2014 Tanaka Akira <akr@fsij.org>
* lib/resolv.rb: Don't set CLOEXEC flag explicitly. (Ruby set it by
default.)
Sat Feb 8 15:27:02 2014 Tanaka Akira <akr@fsij.org>
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raise

View file

@ -1,5 +1,4 @@
require 'socket'
require 'fcntl'
require 'timeout'
require 'thread'
@ -748,7 +747,6 @@ class Resolv
next # The kernel doesn't support the address family.
end
sock.do_not_reverse_lookup = true
sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
DNS.bind_random_port(sock, bind_host)
@socks << sock
@socks_hash[bind_host] = sock
@ -802,7 +800,6 @@ class Resolv
sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET)
@socks = [sock]
sock.do_not_reverse_lookup = true
sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
DNS.bind_random_port(sock, is_ipv6 ? "::" : "0.0.0.0")
sock.connect(host, port)
end
@ -860,7 +857,6 @@ class Resolv
@port = port
sock = TCPSocket.new(@host, @port)
@socks = [sock]
sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
@senders = {}
end