print "PID before fork: $$\n"; fork && exit; print "PID after fork: $$\n"; #### PID before fork: 21314 PID after fork: 21315