Class: ChildProcess::Windows::Process
Instance Attribute Summary
#detach, #exit_code
Instance Method Summary
collapse
#alive?, #crashed?, #initialize, #poll_for_exit, #start
Instance Method Details
#exited? ⇒ Boolean
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/childprocess/windows/process.rb', line 21
def exited?
return true if @exit_code
assert_started
code = @handle.exit_code
exited = code != PROCESS_STILL_ACTIVE
log(:exited? => exited, :code => code)
if exited
@exit_code = code
end
exited
end
|
#io ⇒ Object
5
6
7
|
# File 'lib/childprocess/windows/process.rb', line 5
def io
@io ||= Windows::IO.new
end
|
#stop(timeout = 3) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/childprocess/windows/process.rb', line 9
def stop(timeout = 3)
assert_started
log "sending KILL"
@handle.send(WIN_SIGKILL)
poll_for_exit(timeout)
ensure
@handle.close
end
|