diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-08-28 18:52:48 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-08-28 19:16:50 +0000 |
commit | ca8ed32c8cc990c7e64b6bd7168808a83405a5a5 (patch) | |
tree | cc243811b1dc68edc2fd555f83e762d37f7ecc60 /lib/unicorn | |
parent | 27f4d6ed7c7758620b54deccae319ba7aa9d40eb (diff) | |
download | unicorn-ca8ed32c8cc990c7e64b6bd7168808a83405a5a5.tar.gz |
A follow-up to 4b23693b9082a84433a9e6c1f358b58420176b27 If multithreaded programming can be compared to juggling chainsaws, then multithreaded programming with signal handlers in play is akin to juggling chainsaws on a tightrope over shark-infested waters. (cherry picked from commit feab35fe531843066db3418598874cf9f9419614)
Diffstat (limited to 'lib/unicorn')
-rw-r--r-- | lib/unicorn/util.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb index a735c68..e9dd57f 100644 --- a/lib/unicorn/util.rb +++ b/lib/unicorn/util.rb @@ -62,18 +62,18 @@ module Unicorn begin File.open(fp.path, 'a') { |tmpfp| fp.reopen(tmpfp) } - rescue IOError, Errno::EBADF - next - end - fp.sync = true - new_st = fp.stat + fp.sync = true + new_st = fp.stat - # this should only happen in the master: - if orig_st.uid != new_st.uid || orig_st.gid != new_st.gid - fp.chown(orig_st.uid, orig_st.gid) - end + # this should only happen in the master: + if orig_st.uid != new_st.uid || orig_st.gid != new_st.gid + fp.chown(orig_st.uid, orig_st.gid) + end - nr += 1 + nr += 1 + rescue IOError, Errno::EBADF + # not much we can do... + end end nr |