Record PID of process on spawn.