I want to offload a block of code in my main process to child process to make it run concurrently. I also want to have the PID of the spawned child process so I can monitor
A good alternative to fork/exec/spawn is the posix-spawn gem for Ruby 1.9: https://github.com/rtomayko/posix-spawn
They did most of the hard work to make it easier, efficient, and flexible compared to the lower level methods.