From 6f910ee619f4ad6f05f55eaf42289d7691debf20 Mon Sep 17 00:00:00 2001 From: Vassilis Rizopoulos Date: Sat, 29 Sep 2012 01:32:16 +0200 Subject: use the block in a thread in the jruby monkeypatch --- lib/systemu.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v1.2.1