From 593deb92e8ebd4e77e482c567d97b6ee496ac378 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 16 Jun 2011 23:57:31 +0000 Subject: ensure at_exit handlers run on graceful shutdown rescuing from SystemExit and exit()-ing again is ugly, but changes made to lower stack depth positively affect _everyone_ so we'll tolerate some ugliness here. We'll need to disable graceful exit for some tests, too... --- lib/unicorn/http_server.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 0a9af86..1489495 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -474,14 +474,12 @@ class Unicorn::HttpServer else after_fork_internal worker_loop(worker) - exit(0) + exit end end - rescue SystemExit => e - exit!(e.status) rescue => e @logger.error(e) rescue nil - exit!(1) + exit! end def maintain_worker_count -- cgit v1.2.3-24-ge0c7