about summary refs log tree commit homepage
path: root/lib/unicorn/util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn/util.rb')
-rw-r--r--lib/unicorn/util.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb
index 5ceda5c..458b6d7 100644
--- a/lib/unicorn/util.rb
+++ b/lib/unicorn/util.rb
@@ -57,7 +57,7 @@ module Unicorn
             open_arg << ":#{enc.to_s}"
             enc = fp.internal_encoding and open_arg << ":#{enc.to_s}"
           end
-          fp.reopen(fp.path, open_arg)
+          File.open(fp.path, 'ab') { |tmpfp| fp.reopen(tmpfp) }
           fp.sync = true
           new_st = fp.stat
           if orig_st.uid != new_st.uid || orig_st.gid != new_st.gid