Agree with you but have to mention a few points here:
1) By the law we have to close `@write_io` as soon as we fork because we don't need writing end in parent process, unfortunately this technique doesn't work on jruby because I suppose they emulate fork (by mean of thread?) and if we close it we will lose all the output from subprocess
2) Actually at this point the pipe is already closed from both ends if PhantomJS crashes and `closed?` at least on jruby returns `false` I don't know why, if PhantomJS is still working then there's no problem.