Class Debugger::KillCommand
In: cli/ruby-debug/commands/kill.rb
Parent: Command

Implements debugger "kill" command

Methods

execute   help   help_command   regexp  

Public Class methods

[Source]

    # 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

[Source]

    # File cli/ruby-debug/commands/kill.rb, line 36
36:       def help_command
37:         %w[kill]
38:       end

Public Instance methods

[Source]

    # 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

[Source]

    # File cli/ruby-debug/commands/kill.rb, line 7
 7:     def regexp
 8:       / ^\s*
 9:          (?:kill) \s*
10:          (?:\s+(\S+))?\s*
11:          $
12:       /ix
13:     end

[Validate]