1 from multiprocessing import Process 2 import os 3 4 def test(name): 5 print("pid=%d,ppid=%d,,,,参数=%s"%(os.getpid(),os.getppid(),name)) 6 # args为元组 7 p = Process(target = test, args = ("nameValue",)) 8 p.start() 9 print("___main---pid==%d"%os.getpid())