Module: Signal
- Defined in:
- lib/phusion_passenger/utils.rb
Class Method Summary collapse
-
.list_trappable ⇒ Object
Like Signal.list, but only returns signals that we can actually trap.
Class Method Details
.list_trappable ⇒ Object
Like Signal.list, but only returns signals that we can actually trap.
1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 |
# File 'lib/phusion_passenger/utils.rb', line 1013 def self.list_trappable ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby" case ruby_engine when "ruby" result = Signal.list result.delete("ALRM") result.delete("VTALRM") when "jruby" result = Signal.list result.delete("QUIT") result.delete("ILL") result.delete("FPE") result.delete("KILL") result.delete("SEGV") result.delete("USR1") else result = Signal.list end # Don't touch SIGCHLD no matter what! On OS X waitpid() will # malfunction if SIGCHLD doesn't have a correct handler. result.delete("CLD") result.delete("CHLD") # Other stuff that we don't want to trap no matter which # Ruby engine. result.delete("STOP") return result end |