If you want, you could use a non-blocking eventloop, and use a timer to do your forks. For example: Roll your own Event-loop. There are many other good eventloop modules out there, many use AnyEvent. Regardless of which eventloop system you use, all
will have a timer method.