Skip to content

Commit

Permalink
Don't try to trap SIGKILL since it can't be trapped/ignored.
Browse files Browse the repository at this point in the history
Fixes `appliance_console.rb:105 in `trap': invalid argument - SIGKILL`

Ruby 2.1 and earlier lets you trap SIGKILL even though it's useless.
Ruby 2.2 won't let you try to trap it.

See ManageIQ#2313

[skip ci]
  • Loading branch information
jrafanie committed Jun 25, 2015
1 parent 46398c7 commit 3b3463f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/appliance_console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def agree_with_timeout(*args, &block)

require 'appliance_console/errors.rb'

[:INT, :TERM, :KILL, :ABRT, :TSTP].each { |s| trap(s) { raise MiqSignalError } } if LOCK_CONSOLE
[:INT, :TERM, :ABRT, :TSTP].each { |s| trap(s) { raise MiqSignalError } } if LOCK_CONSOLE

# Disabled in order to allow rescue of timeout error
HighLine.track_eof = false
Expand Down

0 comments on commit 3b3463f

Please sign in to comment.