summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 6a6c2fc..e259dc3 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -2078,7 +2078,11 @@ class Popen(object):
# The race condition can still happen if the race condition
# described above happens between the returncode test
# and the kill() call.
- os.kill(self.pid, sig)
+ try:
+ os.kill(self.pid, sig)
+ except ProcessLookupError:
+ # Supress the race condition error; bpo-40550.
+ pass
def terminate(self):
"""Terminate the process with SIGTERM