in reply to Fork Question

Since you're limiting a system call, you can use BSD::Resource or the equivalent system call.