Class: Debugger::KillCommand

### Home Classes Methods

### In Files

- lib/ruby-debug/commands/kill.rb

### Parent

Debugger::Command

### Methods

- ::help
- ::help_command
- #execute
- #regexp

### Class/Module Index

Quicksearch

- Debugger
- Debugger::AddBreakpoint
- Debugger::Breakpoint
- Debugger::Context
- Debugger::ContinueCommand
- Debugger::DeleteBreakpointCommand
- Debugger::FinishCommand
- Debugger::HelpCommand
- Debugger::IRBCommand
- Debugger::InfoCommand
- Debugger::JumpCommand
- Debugger::KillCommand
- Debugger::ListCommand
- Debugger::LocalInterface
- Debugger::LocalInterface::Debugger
- Debugger::MethodCommand
- Debugger::MethodSigCommand
- Debugger::NextCommand
- Debugger::ParseFunctions
- Debugger::Processor
- Debugger::QuitCommand
- Debugger::ReloadCommand
- Debugger::SetCommand
- Debugger::ShowCommand
- Debugger::SkipCommand
- Debugger::SourceCommand
- Debugger::StepCommand
- Debugger::VarClassVarCommand
- Debugger::VarInheritCommand
- Debugger::VarLocalCommand
- Debugger::WhereCommand
- Printers
- Printers::Base
- Printers::Base::MissedArgument
- Printers::Base::MissedPath
- Printers::Plain
- Mocha
- Mocha::Call
- Mocha::Expectation
- Mocha::Mock
- MiniTest
- MiniTest::Assertions
- MiniTest::Expectations
- TestDsl
- TestDsl::ClassMethods
- TestDsl::Shared
- Kernel
- Module
- PrinterHelpers
- TestInterface

No matching classes.

# Debugger::KillCommand

Implements debugger "kill" command

### Public Class Methods

help(cmd) click to toggle source

    # File lib/ruby-debug/commands/kill.rb, line 40
          def help(cmd)
            %{
              kill [SIGNAL]

              Send [signal] to Process.pid
    Equivalent of Process.kill(Process.pid)
             }
          end

help_command() click to toggle source

    # File lib/ruby-debug/commands/kill.rb, line 36
    def help_command
      ]kill]
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/ruby-debug/commands/kill.rb, line 15
    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
        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

regexp() click to toggle source

    # File lib/ruby-debug/commands/kill.rb, line 7
    def regexp
      / ^\s*
         (?:kill) \s*
         (?:\s+(\S+))?\s*
         $
      /x
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.