class Puma::Launcher
def setup_signals
def setup_signals begin Signal.trap "SIGUSR2" do restart end rescue Exception log "*** SIGUSR2 not implemented, signal based restart unavailable!" end unless Puma.jruby? begin Signal.trap "SIGUSR1" do phased_restart end rescue Exception log "*** SIGUSR1 not implemented, signal based restart unavailable!" end end begin Signal.trap "SIGTERM" do graceful_stop raise(SignalException, "SIGTERM") if @options[:raise_exception_on_sigterm] end rescue Exception log "*** SIGTERM not implemented, signal based gracefully stopping unavailable!" end begin Signal.trap "SIGINT" do stop end rescue Exception log "*** SIGINT not implemented, signal based gracefully stopping unavailable!" end begin Signal.trap "SIGHUP" do if @runner.redirected_io? @runner.redirect_io else stop end end rescue Exception log "*** SIGHUP not implemented, signal based logs reopening unavailable!" end begin Signal.trap "SIGINFO" do log_thread_status end rescue Exception # Not going to log this one, as SIGINFO is *BSD only and would be pretty annoying # to see this constantly on Linux. end end