lib/clockwork/manager.rb in clockwork-2.0.1 vs lib/clockwork/manager.rb in clockwork-2.0.2
- old
+ new
@@ -64,10 +64,10 @@
def run
log "Starting clock for #{@events.size} events: [ #{@events.map(&:to_s).join(' ')} ]"
sig_read, sig_write = IO.pipe
- %w[INT TERM HUP].each do |sig|
+ (%w[INT TERM HUP] & Signal.list.keys).each do |sig|
trap sig do
sig_write.puts(sig)
end
end