summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-04-21 06:16:27 +0000
committerEric Wong <normalperson@yhbt.net>2011-04-21 06:42:25 +0000
commit2aabf90ca53b31edef6c2b63006c33374840c816 (patch)
tree46b32372f09f56a3bf0ada9a22e732ecdb3ebbaf
parent4f7f3bbb973c8f2bb4b189592158a0682ea2a625 (diff)
Mainly small fixes, improvements, and workarounds for fork() issues
with pseudo-random number generators shipped with Ruby (Kernel#rand,
OpenSSL::Random (used by SecureRandom and also by Rails).

The PRNG issues are documented in depth here (and links to Ruby Redmine):

  http://bogomips.org/unicorn.git/commit?id=1107ede7
  http://bogomips.org/unicorn.git/commit?id=b3241621

If you're too lazy to upgrade, you can just do this in your after_fork
hooks:

  after_fork do |server,worker|
    tmp = srand
    OpenSSL::Random.seed(tmp.to_s) if defined?(OpenSSL::Random)
  end

There are also small log reopening (SIGUSR1) improvements:

* relative paths may also be reopened, there's a small chance this
  will break with a handful of setups, but unlikely.  This should
  make configuration easier especially since the "working_directory"
  configurator directive exists.  Brought up by Matthew Kocher:
  http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/900

* workers will just die (and restart) if log reopening fails for
  any reason (including user error).  This is to workaround the issue
  reported by Emmanuel Gomez:
  http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/906
-rwxr-xr-xGIT-VERSION-GEN2
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index e0257bc..66f38a3 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v3.5.0.GIT
+DEF_VER=v3.6.0.GIT
 
 LF='
 '