Class: ChildProcess::Windows::Process
- Inherits:
-
AbstractProcess
- Object
- AbstractProcess
- ChildProcess::Windows::Process
- Defined in:
- lib/childprocess/windows/process.rb
Instance Attribute Summary
Attributes inherited from AbstractProcess
Instance Method Summary collapse
Methods inherited from AbstractProcess
#alive?, #crashed?, #initialize, #poll_for_exit, #start
Constructor Details
This class inherits a constructor from ChildProcess::AbstractProcess
Instance Method Details
#exited? ⇒ Boolean
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/childprocess/windows/process.rb', line 17 def exited? return true if @exit_code assert_started code = @handle.exit_code exited = code != PROCESS_STILL_ACTIVE if exited @exit_code = code end exited end |
#stop(timeout = 3) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/childprocess/windows/process.rb', line 5 def stop(timeout = 3) assert_started # just kill right away on windows. log "sending KILL" @handle.send(WIN_SIGKILL) poll_for_exit(timeout) ensure @handle.close end |