Skip to content

Commit

Permalink
Added rescue to prevent crashing on Windows
Browse files Browse the repository at this point in the history
'unsupported signal SIGUSR1' occurs when running on Windows. SIGINT is supported in Windows and the rest would be ignored.
  • Loading branch information
Tom Dallimore committed Feb 18, 2014
1 parent 339e679 commit 8911d7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/sidekiq/cli.rb
Expand Up @@ -46,8 +46,12 @@ def run
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

Expand Down

0 comments on commit 8911d7d

Please sign in to comment.