lib/puma/daemon/runner_adapter.rb in puma-daemon-0.3.2 vs lib/puma/daemon/runner_adapter.rb in puma-daemon-0.5.0

- old
+ new

@@ -2,21 +2,22 @@ require_relative 'version' module Puma module Daemon + # noinspection RubySuperCallWithoutSuperclassInspection module RunnerAdapter class << self def included(base) base.class_eval do attr_reader :options attr_accessor :has_demonized end base.class_eval do def output_header(mode) - super(mode) + super daemonize! if daemon? end def daemon? @@ -33,13 +34,13 @@ Process.daemon(true, true) self.has_demonized = true end def log(str) - return if str =~ /Ctrl-C/ + return if str.include?('Ctrl-C') begin - super(str) + super rescue StandardError puts(str) end end end