about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-07-09 01:47:46 -0700
committerEric Wong <normalperson@yhbt.net>2009-07-09 01:48:48 -0700
commitab4fc790099a1f46c61c8cc294c1371699abfde6 (patch)
tree9c94e9db13652ba71aa4b20d4b7cca7b46ffb930
parentec70433f84664af0dff1336845ddd51f50a714a3 (diff)
parentf3d7ea324c893ba9d8787afbaa9d2e55fcae0133 (diff)
downloadunicorn-ab4fc790099a1f46c61c8cc294c1371699abfde6.tar.gz
* maint:
  unicorn 0.8.2
  always set FD_CLOEXEC on sockets post-accept()
  Minor cleanups to core
  Re-add support for non-portable socket options
  Retry listen() on EADDRINUSE 5 times ever 500ms
  Unbind listeners as before stopping workers

Conflicts:
	CHANGELOG
	lib/unicorn.rb
	lib/unicorn/configurator.rb
	lib/unicorn/const.rb
-rw-r--r--CHANGELOG2
-rw-r--r--lib/unicorn.rb1
-rw-r--r--lib/unicorn/const.rb2
3 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 58cdd4b..3fd10b8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
+v0.9.1 - FD_CLOEXEC portability fix (v0.8.2 port)
 v0.9.0 - bodies: "Transfer-Encoding: chunked", rewindable streaming
+v0.8.2 - socket handling bugfixes and usability tweaks
 v0.8.1 - safer timeout handling, more consistent reload behavior
 v0.8.0 - enforce Rack dependency, minor performance improvements and fixes
 v0.7.1 - minor fixes, cleanups and documentation improvements
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index dac0b4f..eb11f4d 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -444,6 +444,7 @@ module Unicorn
     # once a client is accepted, it is processed in its entirety here
     # in 3 easy steps: read request, call app, write app response
     def process_client(client)
+      client.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
       response = app.call(env = REQUEST.read(client))
 
       if 100 == response.first.to_i
diff --git a/lib/unicorn/const.rb b/lib/unicorn/const.rb
index 0d44dba..ef58984 100644
--- a/lib/unicorn/const.rb
+++ b/lib/unicorn/const.rb
@@ -5,7 +5,7 @@ module Unicorn
   # gave about a 3% to 10% performance improvement over using the strings directly.
   # Symbols did not really improve things much compared to constants.
   module Const
-    UNICORN_VERSION="0.9.0".freeze
+    UNICORN_VERSION="0.9.1".freeze
 
     DEFAULT_HOST = "0.0.0.0".freeze # default TCP listen host address
     DEFAULT_PORT = "8080".freeze    # default TCP listen port