multiprocessing.Process.is_alive() returns True although process has finished, why?
问题 I use multiprocess.Process to create a child process and then call os.wait4 until child exists. When the actual child process finishes, multiprocess.Process.is_alive() still returns True . That's contradicting. Why? Code: from multiprocessing import Process import os, sys proc = Process(target=os.system, args= ("sleep 2", )) proc.start() print "is_alive()", proc.is_alive() ret = os.wait4(proc.pid, 0) procPid, procStatus, procRes = ret print "wait4 = ", ret ## Puzzled! print "----Puzzled below