From cabbc6ce06487619431af102378aefa08d55f9f1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 13 Apr 2011 07:34:31 +0000 Subject: http_server: workers die on log reopen failures They should then recover and inherit writable descriptors from the master when it respawns. --- lib/unicorn/http_server.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index db150f3..07d0b4f 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -568,6 +568,9 @@ class Unicorn::HttpServer Unicorn::Util.reopen_logs logger.info "worker=#{worker_nr} done reopening logs" init_self_pipe! + rescue => e + logger.error(e) rescue nil + exit!(77) # EX_NOPERM in sysexits.h end # runs inside each forked worker, this sits around and waits -- cgit v1.2.3-24-ge0c7