class Byebug::KillCommand
Implements byebug “kill” command
def execute
def execute puts @match[1] 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 if 'KILL' == signame @state.interface.finalize end else if not confirm("Really kill? (y/n) ") return else signame = 'KILL' end end Process.kill(signame, Process.pid) end
def help(cmd)
def help(cmd) %{ kill [SIGNAL] Send [signal] to Process.pid lent of Process.kill(Process.pid) } end
def help_command
def help_command %w[kill] end
def regexp
def regexp / ^\s* (?:kill) \s* (?:\s+(\S+))?\s* $ /ix end