log pid after spawning a process