Displaying 2 results from an estimated 2 matches for "0c2af5d".
2012 Feb 29
2
[PATCH] Start the server if another user has a PID matching our stale pidfile.
...sed by
another process, the current unicorn code will exit and not start a
server. This tiny patch fixes that behaviour.
---
lib/unicorn/http_server.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb
index 7d2c623..0c2af5d 100644
--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -656,7 +656,7 @@ class Unicorn::HttpServer
wpid <= 0 and return
Process.kill(0, wpid)
wpid
- rescue Errno::ESRCH, Errno::ENOENT
+ rescue Errno::ESRCH, Errno::ENOENT, Errno::EPERM
# don'...
2012 Mar 22
1
[PATCH] make stderr_path/stdout_path support IO objects directly
...b/unicorn/configurator.rb
@@ -559,7 +559,7 @@ private
def set_path(var, path) #:nodoc:
case path
- when NilClass, String
+ when NilClass, String, IO
set[var] = path
else
raise ArgumentError
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb
index 0c2af5d..bd71fbf 100644
--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -698,7 +698,11 @@ class Unicorn::HttpServer
end
def redirect_io(io, path)
- File.open(path, ''ab'') { |fp| io.reopen(fp) } if path
+ if path.is_a?(IO)
+ io.reopen(path)
+ elsif...