From: Gregory P. Smith Date: Sun, 6 Jul 2008 07:16:40 +0000 (+0000) Subject: - Issue #2113: Fix error in subprocess.Popen if the select system call is X-Git-Tag: v2.6b2~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f41406409e17344a471c28226c361f983601b56c;p=python - Issue #2113: Fix error in subprocess.Popen if the select system call is interrupted by a signal. --- diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 606559413e..35970f8c7e 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1158,7 +1158,12 @@ class Popen(object): input_offset = 0 while read_set or write_set: - rlist, wlist, xlist = select.select(read_set, write_set, []) + try: + rlist, wlist, xlist = select.select(read_set, write_set, []) + except select.error, e: + if e.args[0] == errno.EINTR: + continue + raise if self.stdin in wlist: # When select has indicated that the file is writable, diff --git a/Misc/NEWS b/Misc/NEWS index 715746c874..f50459c770 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -59,6 +59,9 @@ Library urllib module in Python 3.0 to urllib.request, urllib.parse, and urllib.error. +- Issue #2113: Fix error in subprocess.Popen if the select system call is + interrupted by a signal. + Build -----