09 Sep '12, 3am
@jstorimer @titanous Also interesting reading:
However, since this post I've learned of the "posix_spawn " function available on most Unix variants. It's basically fork + exec in a single function, plus most of the typical security and IO tweaks you might do after forking and before execing. It's definitely my recommended alternative to fork+exec for JRuby, and to make that easier I've bundled it up as the "spoon" gem (gem install spoon) which provides spawn and spawnp to JRuby users directly. Here's an example session using Spoon to launch JRuby as a daemon . If you just need fork+exec on the JVM, posix_spawn or the Spoon gem are the best way to do it.