giampaolo / psutil

Cross-platform lib for process and system monitoring in Python
BSD 3-Clause "New" or "Revised" License
10.32k stars 1.39k forks source link

Fix process_iter() not running for entire process #2297

Closed chozekun closed 1 year ago

chozekun commented 1 year ago

Summary

Description

There is a bug where pids() very occasionally returns fewer processes than it actually has. Therefore, instead of deleting it right away, check if the actual process is alive before deleting it. (Sorry for my poor English)

chozekun commented 1 year ago

Closed due to test failure.