diff options
author | ara.t.howard <ara.t.howard@gmail.com> | 2012-03-12 19:59:29 -0700 |
---|---|---|
committer | ara.t.howard <ara.t.howard@gmail.com> | 2012-03-12 19:59:29 -0700 |
commit | 1bdc3fd9557e9a6897fb89134b7d1234e0494647 (patch) | |
tree | 88f21726af2545dd6ce29461e8d0221575ad001a | |
parent | 5181b8a71605315fd74785d0a4be5e1040195e84 (diff) | |
parent | b5d60c37a9649ae7dd932fcece7c77109cce0d81 (diff) | |
download | systemu-1bdc3fd9557e9a6897fb89134b7d1234e0494647.tar.gz |
Merge pull request #17 from cldwalker/jruby
pass pid to RubyProcess::RubyStatus.new_process_status
-rw-r--r-- | lib/systemu.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/systemu.rb b/lib/systemu.rb index 9252450..e29131b 100644 --- a/lib/systemu.rb +++ b/lib/systemu.rb @@ -173,7 +173,7 @@ class SystemUniversal def child_program config <<-program # encoding: utf-8 - + PIPE = STDOUT.dup begin config = Marshal.load(IO.read('#{ config }')) @@ -274,8 +274,11 @@ if defined? JRUBY_VERSION end exit_code = process.wait_for + field = process.get_class.get_declared_field("pid") + field.set_accessible(true) + pid = field.get(process) [ - RubyProcess::RubyStatus.new_process_status(JRuby.runtime, exit_code), + RubyProcess::RubyStatus.new_process_status(JRuby.runtime, exit_code, pid), stdout.join, stderr.join ] |