about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-04-01 16:09:03 -0700
committerEric Wong <normalperson@yhbt.net>2011-04-01 16:11:03 -0700
commit6647dcb3afa4c0b16c5fef5bfdf88292e6adf6ca (patch)
tree1773b2cf8fc218300850a884c901140bde8b43da
parentebcc5b45adfb1d04af98356d867e9221ecdc9b70 (diff)
Users keep both pieces if it's broken :)
-rw-r--r--lib/unicorn/util.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb
index 82329eb..cde2563 100644
--- a/lib/unicorn/util.rb
+++ b/lib/unicorn/util.rb
@@ -8,7 +8,6 @@ module Unicorn::Util
 
     ! fp.closed? &&
       fp.sync &&
-      fp.path[0] == ?/ &&
       (fp.fcntl(Fcntl::F_GETFL) & append_flags) == append_flags
     rescue IOError, Errno::EBADF
       false
@@ -25,10 +24,12 @@ module Unicorn::Util
   # using logrotate(8) (without copytruncate) or similar tools.
   # A +File+ object is considered for reopening if it is:
   #   1) opened with the O_APPEND and O_WRONLY flags
-  #   2) opened with an absolute path (starts with "/")
-  #   3) the current open file handle does not match its original open path
-  #   4) unbuffered (as far as userspace buffering goes, not O_SYNC)
+  #   2) the current open file handle does not match its original open path
+  #   3) unbuffered (as far as userspace buffering goes, not O_SYNC)
   # Returns the number of files reopened
+  #
+  # In Unicorn 3.5.x and earlier, files must be opened with an absolute
+  # path to be considered a log file.
   def self.reopen_logs
     to_reopen = []
     nr = 0