Class: ChildProcess::JRuby::Process
Instance Attribute Summary
#detach, #exit_code
Instance Method Summary
collapse
#alive?, #crashed?, #initialize, #poll_for_exit, #start
Instance Method Details
#exited? ⇒ Boolean
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/childprocess/jruby/process.rb', line 10
def exited?
return true if @exit_code
assert_started
@exit_code = @process.exitValue
true
rescue java.lang.IllegalThreadStateException
false
ensure
log(:exit_code => @exit_code)
end
|
#io ⇒ Object
6
7
8
|
# File 'lib/childprocess/jruby/process.rb', line 6
def io
@io ||= JRuby::IO.new
end
|
#stop(timeout = nil) ⇒ Object
22
23
24
25
26
27
28
29
|
# File 'lib/childprocess/jruby/process.rb', line 22
def stop(timeout = nil)
assert_started
@process.destroy
@process.waitFor
@exit_code = @process.exitValue
end
|