make sure we wait for our child pid to be set before we do anything.
remove an unnecessary getpid call