- open3 currently doesn't return a thread object, and its implementation is different in JRuby.
  See https://github.com/jruby/jruby/issues/332
- popen4 is a JRuby replacement for the open4 gem, which returns a PID (but wasn't used in the end, as it also sets $?).
  See http://jira.codehaus.org/browse/JRUBY-5684
- the other promising candidate is spoon, which uses spawn and even works in Windows.
  See https://github.com/headius/spoon

I'll try with popen3 and $?.