giampaolo / psutil

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

Fix process_iter() not running for entire process #2297

Closed chozekun closed 11 months ago

chozekun commented 11 months 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 11 months ago

Closed due to test failure.