| 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 1013
1013: def self.list_trappable
1014: ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
1015: case ruby_engine
1016: when "ruby"
1017: result = Signal.list
1018: result.delete("ALRM")
1019: result.delete("VTALRM")
1020: when "jruby"
1021: result = Signal.list
1022: result.delete("QUIT")
1023: result.delete("ILL")
1024: result.delete("FPE")
1025: result.delete("KILL")
1026: result.delete("SEGV")
1027: result.delete("USR1")
1028: else
1029: result = Signal.list
1030: end
1031:
1032: # Don't touch SIGCHLD no matter what! On OS X waitpid() will
1033: # malfunction if SIGCHLD doesn't have a correct handler.
1034: result.delete("CLD")
1035: result.delete("CHLD")
1036:
1037: # Other stuff that we don't want to trap no matter which
1038: # Ruby engine.
1039: result.delete("STOP")
1040:
1041: return result
1042: end