class Byebug::KillCommand
Send custom signals to the debugged program.
Public Class Methods
description()
click to toggle source
# File lib/byebug/commands/kill.rb, line 35 def description prettify <<-EOD kill[ SIGNAL] Send [signal] to Process.pid Equivalent of Process.kill(Process.pid) EOD end
names()
click to toggle source
# File lib/byebug/commands/kill.rb, line 31 def names %w(kill) end
Public Instance Methods
execute()
click to toggle source
# File lib/byebug/commands/kill.rb, line 14 def execute if @match[1] signame = @match[1] unless Signal.list.member?(signame) errmsg("signal name #{signame} is not a signal I know about\n") return false end @state.interface.close if 'KILL' == signame else return unless confirm('Really kill? (y/n) ') signame = 'KILL' end Process.kill(signame, Process.pid) end
regexp()
click to toggle source
# File lib/byebug/commands/kill.rb, line 10 def regexp /^\s* (?:kill) \s* (?:\s+(\S+))? \s*$/x end