Simplify getpid handling of the race case.