[PATCH] chowning /dev/null should be guarded against

Eric Wong normalperson at yhbt.net
Tue Oct 2 04:25:08 UTC 2012


Joel Meador <joel at expectedbehavior.com> wrote:
> Eric Wong wrote:
> >--- a/lib/unicorn/util.rb
> >+++ b/lib/unicorn/util.rb
> >@@ -7,6 +7,7 @@ def self.is_log?(fp)
> >      append_flags = File::WRONLY | File::APPEND
> >
> >      ! fp.closed?&&
> >+      fp.stat.file?&&
> >        fp.sync&&
> >        (fp.fcntl(Fcntl::F_GETFL)&  append_flags) == append_flags
> >      rescue IOError, Errno::EBADF
> This looks much better as a general solution to the problem. +1
> Thanks, Eric!

Thanks for reporting!  Pushed to "master" of git://bogomips.org/unicorn
as commit 032791b9a367f67febbe7534f6ea4cac127e7897

Will probably tag + release a new version in day or two.


More information about the mongrel-unicorn mailing list