| Class | Debugger::KillCommand |
| In: |
cli/ruby-debug/commands/kill.rb
|
| Parent: | Command |
Implements debugger "kill" command
# File cli/ruby-debug/commands/kill.rb, line 40
40: def help(cmd)
41: %{
42: kill [SIGNAL]
43:
44: Send [signal] to Process.pid
45: Equivalent of Process.kill(Process.pid)
46: }
47: end
# File cli/ruby-debug/commands/kill.rb, line 15
15: def execute
16: if @match[1]
17: signame = @match[1]
18: unless Signal.list.member?(signame)
19: errmsg("signal name #{signame} is not a signal I know about\n")
20: return false
21: end
22: if 'KILL' == signame
23: @state.interface.finalize
24: end
25: else
26: if not confirm("Really kill? (y/n) ")
27: return
28: else
29: signame = 'KILL'
30: end
31: end
32: Process.kill(signame, Process.pid)
33: end