From 86b7d9718d7399d04e0aa30cf4eaa4d3c0785092 Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Thu, 11 Jul 2013 11:46:18 -0700 Subject: [PATCH] Detect when the jruby daemon child doesn't start properly --- lib/puma/single.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/puma/single.rb b/lib/puma/single.rb index 2ba4dff2..1486583d 100644 --- a/lib/puma/single.rb +++ b/lib/puma/single.rb @@ -55,6 +55,11 @@ module Puma exit end + Signal.trap "SIGCHLD" do + log "! Error starting new process as daemon, exitting" + exit 1 + end + pid = @cli.jruby_daemon_start sleep end