Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法确定进程/PID 是否处于暂停状态?
当前Popen("kill -STOP "+str(pid),shell=True)用于暂停进程。
Popen("kill -STOP "+str(pid),shell=True)
确定给定 pid 是否处于暂停状态的推荐方法是什么?
您可以阅读/proc/:pid/stat或/proc/:pid/status,例如:
/proc/:pid/stat
/proc/:pid/status
Name: python State: T (stopped)