import sys, osimport timepid = os.fork()if pid > 0: # child print "child PID %d" % pid for i in range(10): time.sleep(1) print "-" sys.exit(0)print "parent PID %d" % pidfor j in range(10): time.sleep(1) print '+'
沒有留言:
張貼留言