Extract forking stuff

This method now makes sure that @child_pid is dealt with entirely inside its
scope, which is nice.