rtomayko/posix-spawn — pull request #41 by mrbrdo (2013-09-15 16:44:02+00:00)
Title: JRuby support with native Java classes

JRuby's support for this is very bad, there is no single method to allow you to do everything (set env, redirect out/err/in etc). I've written a wrapper around Java ProcessBuilder to allow for this. For the moment it is enough for my needs, and is a good starting point also. Some things are a bit hacked around so that I did not need to change existing code too much. There is one test in test_child that does not work, because I did not understand how it could work (it doesn't make sense to me). There are a substantial number of tests failing in test_spawn, mostly due to unsupported options like FD redirection (which is possible to implement but I have no time at the moment).

**It's not good for merge** obviously, but I hope someone will pick it up and fix the remaining specs. Also note I use platform-specific (*nix) code to figure out the PID of the spawned process and ugly hacks around $?. It is possible to avoid this but then other code must take into account that Java does not operate on PIDs.