Skip to content
Browse files

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.
  • Loading branch information...
1 parent 339e679 commit 8911d7dafe2384ebbff6510b0ee5894bb0f54ea2 Tom Dallimore committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/sidekiq/cli.rb
View
8 lib/sidekiq/cli.rb
@@ -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

0 comments on commit 8911d7d

Please sign in to comment.
Something went wrong with that request. Please try again.