[前][次][番号順一覧][スレッド一覧]

ruby-changes:32806

From: akr <ko1@a...>
Date: Sat, 8 Feb 2014 15:42:31 +0900 (JST)
Subject: [ruby-changes:32806] akr:r44885 (trunk): * lib/resolv.rb: Don't set CLOEXEC flag explicitly. (Ruby set it by

akr	2014-02-08 15:42:28 +0900 (Sat, 08 Feb 2014)

  New Revision: 44885

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44885

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

  Modified files:
    trunk/ChangeLog
    trunk/lib/resolv.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44884)
+++ ChangeLog	(revision 44885)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Feb  8 15:41:37 2014  Tanaka Akira  <akr@f...>
+
+	* lib/resolv.rb: Don't set CLOEXEC flag explicitly.  (Ruby set it by
+	  default.)
+
 Sat Feb  8 15:27:02 2014  Tanaka Akira  <akr@f...>
 
 	* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raise
Index: lib/resolv.rb
===================================================================
--- lib/resolv.rb	(revision 44884)
+++ lib/resolv.rb	(revision 44885)
@@ -1,5 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L1
 require 'socket'
-require 'fcntl'
 require 'timeout'
 require 'thread'
 
@@ -748,7 +747,6 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L747
               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 https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L800
           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 https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L857
           @port = port
           sock = TCPSocket.new(@host, @port)
           @socks = [sock]
-          sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
           @senders = {}
         end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]