| Module | Signal |
| In: |
lib/phusion_passenger/utils.rb
|
Like Signal.list, but only returns signals that we can actually trap.
# File lib/phusion_passenger/utils.rb, line 1005
1005: def self.list_trappable
1006: ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
1007: case ruby_engine
1008: when "ruby"
1009: result = Signal.list
1010: result.delete("ALRM")
1011: result.delete("VTALRM")
1012: when "jruby"
1013: result = Signal.list
1014: result.delete("QUIT")
1015: result.delete("ILL")
1016: result.delete("FPE")
1017: result.delete("KILL")
1018: result.delete("SEGV")
1019: result.delete("USR1")
1020: else
1021: result = Signal.list
1022: end
1023:
1024: # Don't touch SIGCHLD no matter what! On OS X waitpid() will
1025: # malfunction if SIGCHLD doesn't have a correct handler.
1026: result.delete("CLD")
1027: result.delete("CHLD")
1028:
1029: # Other stuff that we don't want to trap no matter which
1030: # Ruby engine.
1031: result.delete("STOP")
1032:
1033: return result
1034: end