about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-10-01 21:18:02 -0700
committerEric Wong <normalperson@yhbt.net>2012-10-01 21:18:02 -0700
commit032791b9a367f67febbe7534f6ea4cac127e7897 (patch)
treec5676b1ee3f860e892fe6c767b514581f69ce86d /lib
parent5acf5522295c947d3118926d1a1077007f615de9 (diff)
downloadunicorn-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.
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn/util.rb1
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