Class: Guard::Rack::CustomProcess::Windows

Inherits:
Guard::Rack::CustomProcess show all
Defined in:
lib/guard/rack/custom_process.rb

Instance Attribute Summary

Attributes inherited from Guard::Rack::CustomProcess

#options

Instance Method Summary collapse

Methods inherited from Guard::Rack::CustomProcess

#initialize, new

Constructor Details

This class inherits a constructor from Guard::Rack::CustomProcess

Instance Method Details

#kill(pid, _force = true) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/guard/rack/custom_process.rb', line 45

def kill(pid, _force = true)
  # Doesn't matter if its forceful or not. There's only one way of ending it
  system("taskkill /pid #{pid} /T /f")
  result = $CHILD_STATUS.exitstatus
  if result == 0
    UI.debug("Killed Rack (Exit status: #{result})")
  else
    UI.debug("Couldn't kill Rack")
  end
  result
end