Module Signal |
In: | lib/phusion_passenger/utils.rb

Methods

- list_trappable

Public Class methods
list_trappable()

Like Signal.list, but only returns signals that we can actually trap.

[ show source ]

         # File lib/phusion_passenger/utils.rb, line 554
    554:         def self.list_trappable
    555:                 ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
    556:                 case ruby_engine
    557:                 when "ruby"
    558:                         result = Signal.list
    559:                         result.delete("ALRM")
    560:                         result.delete("VTALRM")
    561:                         return result
    562:                 when "jruby"
    563:                         result = Signal.list
    564:                         result.delete("QUIT")
    565:                         result.delete("ILL")
    566:                         result.delete("FPE")
    567:                         result.delete("KILL")
    568:                         result.delete("SEGV")
    569:                         result.delete("STOP")
    570:                         result.delete("USR1")
    571:                         return result
    572:                 else
    573:                         return Signal.list
    574:                 end
    575:         end