bpo-38630: subprocess: enhance send_signal() on Unix by vstinner · Pull Request #16984 · python/cpython
On Unix, subprocess.Popen.send_signal() now polls the process status. Polling reduces the risk of sending a signal to the wrong process if the process completed, the Popen.returncode attribute is still None, and the pid has been reassigned (recycled) to a new different process.
vstinner
deleted the
subprocess_send_signal
branch
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request
Jan 31, 2020…H-16984) On Unix, subprocess.Popen.send_signal() now polls the process status. Polling reduces the risk of sending a signal to the wrong process if the process completed, the Popen.returncode attribute is still None, and the pid has been reassigned (recycled) to a new different process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters