From f1d8dd94122395cd7b072aeec8942f2cd6b8ca99 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 14 Jun 2011 23:25:43 +0000 Subject: http_server: do not rescue from proper exits Oops, it messes logging up badly. --- lib/unicorn/http_server.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 66b137f..d0a8dfc 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -505,15 +505,16 @@ class Unicorn::HttpServer if pid = fork WORKERS[pid] = worker else - begin - after_fork_internal - worker_loop(worker) - exit(0) - rescue Object - exit!(1) - end + after_fork_internal + worker_loop(worker) + exit(0) end end + rescue SystemExit => e + exit!(e.status) + rescue => e + @logger.error(e) rescue nil + exit!(1) end def maintain_worker_count -- cgit v1.2.3-24-ge0c7