📜  检查子进程的状态 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:09.854000             🧑  作者: Mango

代码示例1
p = subprocess.Popen(...
"""
A None value indicates that the process hasn't terminated yet.
"""
poll = p.poll()
if poll is None:
  # p.subprocess is alive