1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Added rescue to prevent crashing on Windows

'unsupported signal SIGUSR1' occurs when running on Windows. SIGINT is supported in Windows and the rest would be ignored.
This commit is contained in:
Tom Dallimore 2014-02-18 09:27:04 +00:00
parent 339e679125
commit 8911d7dafe

View file

@ -46,8 +46,12 @@ module Sidekiq
self_read, self_write = IO.pipe self_read, self_write = IO.pipe
%w(INT TERM USR1 USR2 TTIN).each do |sig| %w(INT TERM USR1 USR2 TTIN).each do |sig|
trap sig do begin
self_write.puts(sig) trap sig do
self_write.puts(sig)
end
rescue ArgumentError
puts "Signal #{sig} not supported"
end end
end end