diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-03-04 01:56:12 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-03-04 01:56:12 -0800 |
commit | 0372232d3e44aaf735d47996792eb46282fc209a (patch) | |
tree | 30c1b107310969a34ea09f84593f02ad5feedfec | |
parent | 797c608c01b7e06dbd2935a8788ed4f4e11fcc0c (diff) | |
download | unicorn-0372232d3e44aaf735d47996792eb46282fc209a.tar.gz |
The $stderr/$stdout objects need to point to +File+ objects and mot just +IO+ objects they default to for reopen_logs to work.
-rw-r--r-- | lib/unicorn.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 72dc56b..8754610 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -90,8 +90,8 @@ module Unicorn raise ArgumentError, "no listeners" if @listeners.empty? self.pid = @config[:pid] build_app! if @preload_app - $stderr.reopen(@stderr_path, "a") if @stderr_path - $stdout.reopen(@stdout_path, "a") if @stdout_path + $stderr.reopen(File.open(@stderr_path, "a")) if @stderr_path + $stdout.reopen(File.open(@stdout_path, "a")) if @stdout_path $stderr.sync = $stdout.sync = true spawn_missing_workers self |