diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-10-01 21:18:02 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-10-01 21:18:02 -0700 |
commit | 032791b9a367f67febbe7534f6ea4cac127e7897 (patch) | |
tree | c5676b1ee3f860e892fe6c767b514581f69ce86d | |
parent | 5acf5522295c947d3118926d1a1077007f615de9 (diff) | |
download | unicorn-032791b9a367f67febbe7534f6ea4cac127e7897.tar.gz |
If a user specifies a non-regular file for stderr_path or stdout_path, we should not attempt to reopen or chown it. This should also allow users to specify FIFOs as log destinations.
-rw-r--r-- | lib/unicorn/util.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb index cde2563..f84241c 100644 --- a/lib/unicorn/util.rb +++ b/lib/unicorn/util.rb @@ -7,6 +7,7 @@ module Unicorn::Util append_flags = File::WRONLY | File::APPEND ! fp.closed? && + fp.stat.file? && fp.sync && (fp.fcntl(Fcntl::F_GETFL) & append_flags) == append_flags rescue IOError, Errno::EBADF |