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

ruby-changes:38438

From: normal <ko1@a...>
Date: Sun, 17 May 2015 14:59:27 +0900 (JST)
Subject: [ruby-changes:38438] normal:r50519 (trunk): lib/webrick/server.rb: avoid redundant fcntl call

normal	2015-05-17 14:59:08 +0900 (Sun, 17 May 2015)

  New Revision: 50519

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

  Log:
    lib/webrick/server.rb: avoid redundant fcntl call
    
    Sockets are close-on-exec by default since Ruby 2.0, so it
    is redundant to set it again.
    
    * lib/webrick/server.rb (accept_client): avoid redundant fcntl call
      [Feature #11137]

  Modified files:
    trunk/ChangeLog
    trunk/lib/webrick/server.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50518)
+++ ChangeLog	(revision 50519)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun May 17 14:57:42 2015  Eric Wong  <e@8...>
+
+	* lib/webrick/server.rb (accept_client): avoid redundant fcntl call
+	  [Feature #11137]
+
 Sun May 17 12:13:33 2015  Eric Wong  <e@8...>
 
 	* ext/socket/init.c (cloexec_accept): support nonblock flag and
Index: lib/webrick/server.rb
===================================================================
--- lib/webrick/server.rb	(revision 50518)
+++ lib/webrick/server.rb	(revision 50519)
@@ -263,7 +263,6 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/server.rb#L263
         sock = svr.accept
         sock.sync = true
         Utils::set_non_blocking(sock)
-        Utils::set_close_on_exec(sock)
       rescue Errno::ECONNRESET, Errno::ECONNABORTED,
              Errno::EPROTO, Errno::EINVAL
       rescue StandardError => ex

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

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