diff options
Diffstat (limited to 'lib/logger.rb')
-rw-r--r-- | lib/logger.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/logger.rb b/lib/logger.rb index c70b091469..3c50cb2313 100644 --- a/lib/logger.rb +++ b/lib/logger.rb @@ -644,8 +644,7 @@ private begin File.open(@filename, File::WRONLY | File::APPEND) do |lock| lock.flock(File::LOCK_EX) # inter-process locking. will be unlocked at closing file - ino = lock.stat.ino - if ino == File.stat(@filename).ino + if File.identical?(@filename, lock) and File.identical?(lock, @dev) yield # log shifting else # log shifted by another process (i-node before locking and i-node after locking are different) |