def DumpThreadStacks(pid):
sddir = os.path.dirname(sys.argv[0])
p = psutil.Popen([os.path.join(sddir, "stackdump.exe"), str(pid)],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
# wait for the process to terminate
out = p.communicate()[0]
return out
评论列表
文章目录