Sha256: e07e77d593cca0f194ee16c21c3bdb510f838fa243d31684864c907167852ade
Contents?: true
Size: 301 Bytes
Versions: 41
Compression:
Stored size: 301 Bytes
Contents
module Signal def self.register_shutdown_handler(&block) signals = %w(INT TERM) # The signal QUIT is in use by the JVM itself signals << 'QUIT' unless RUBY_PLATFORM == 'java' signals.each do |sig| old = trap(sig) {} trap(sig) { block.call; old.call } end end end
Version data entries
41 entries across 41 versions & 2 rubygems