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:
parent
339e679125
commit
8911d7dafe
1 changed files with 6 additions and 2 deletions
|
@ -46,8 +46,12 @@ module Sidekiq
|
|||
self_read, self_write = IO.pipe
|
||||
|
||||
%w(INT TERM USR1 USR2 TTIN).each do |sig|
|
||||
trap sig do
|
||||
self_write.puts(sig)
|
||||
begin
|
||||
trap sig do
|
||||
self_write.puts(sig)
|
||||
end
|
||||
rescue ArgumentError
|
||||
puts "Signal #{sig} not supported"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue