summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVassilis Rizopoulos <vassilisrizopoulos@gmail.com>2012-09-29 01:32:16 +0200
committerVassilis Rizopoulos <vassilisrizopoulos@gmail.com>2012-09-29 01:32:16 +0200
commit6f910ee619f4ad6f05f55eaf42289d7691debf20 (patch)
tree105a08fbcd0ca4b775cc81e6f26f506ef031ef67
parentcb253a8bf213beea69f27418202e936a22d7308f (diff)
downloadsystemu-6f910ee619f4ad6f05f55eaf42289d7691debf20.tar.gz
use the block in a thread in the jruby monkeypatch
-rw-r--r--lib/systemu.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/systemu.rb b/lib/systemu.rb
index 4334793..719b70a 100644
--- a/lib/systemu.rb
+++ b/lib/systemu.rb
@@ -273,10 +273,11 @@ if defined? JRUBY_VERSION
StreamReader.new(stream)
end
- exit_code = process.wait_for
field = process.get_class.get_declared_field("pid")
field.set_accessible(true)
pid = field.get(process)
+ thread = new_thread pid, @block if @block
+ exit_code = process.wait_for
[
RubyProcess::RubyStatus.new_process_status(JRuby.runtime, exit_code, pid),
stdout.join,