print out the fork, and only delete pid if exists