method

install_signal_handler

rails latest stable - Class: RailsFCGIHandler

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

install_signal_handler(signal, handler = nil)
protected

No documentation available.

# File railties/lib/fcgi_handler.rb, line 137
    def install_signal_handler(signal, handler = nil)
      if SIGNALS.include?(signal) && self.class.method_defined?(name = "#{SIGNALS[signal]}_handler")
        handler ||= method(name).to_proc

        begin
          trap(signal, handler)
        rescue ArgumentError
          dispatcher_log :warn, "Ignoring unsupported signal #{signal}."
        end
      else
        dispatcher_log :warn, "Ignoring unsupported signal #{signal}."
      end
    end