mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.14] gh-142195: Fixed Popen.communicate indefinite loops (GH-143203) (#143255)
gh-142195: Fixed Popen.communicate indefinite loops (GH-143203)
Changed condition to evaluate if timeout is less than or equals to 0. This is needed for simulated time environments such as Shadow where the time will match exactly on the boundary.
---------
(cherry picked from commit fa9a4254e8)
Co-authored-by: Prithviraj Chaudhuri <p.chaudhuri1993@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
4c3e2114b5
commit
8def603d85
2 changed files with 2 additions and 1 deletions
|
|
@ -2141,7 +2141,7 @@ def _communicate(self, input, endtime, orig_timeout):
|
|||
|
||||
while selector.get_map():
|
||||
timeout = self._remaining_time(endtime)
|
||||
if timeout is not None and timeout < 0:
|
||||
if timeout is not None and timeout <= 0:
|
||||
self._check_timeout(endtime, orig_timeout,
|
||||
stdout, stderr,
|
||||
skip_check_and_raise=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue