=begin
We should also compare inode of @filename and @dev, right?
The following patch works fine for me.
diff --git a/lib/logger.rb b/lib/logger.rb
index c70b091..071594d 100644
--- a/lib/logger.rb
+++ b/lib/logger.rb
@@ -645,7 +645,7 @@ private
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 ino == File.stat(@filename).ino and ino == @dev.stat.ino
yield # log shifting
else
# log shifted by another process (i-node before locking and i-node after locking are different)
This issue seems introduced by r43511. So I assign this to naruse san.
No. This bug is what logger.rb has been having for a long time.
The above patch fixes the newly implemented method for simplicity.
The actual problem is #9133. Updated patch is also available there.
Please see to it.