import os import sys pid = os.fork() if pid > 0: # exit first parent print "closing parent" sys.exit(0) print "fork was successful"