in reply to problem with forking

Try using Parallel::ForkManager perl module.