diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-07-06 07:16:40 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-07-06 07:16:40 (GMT) |
commit | f41406409e17344a471c28226c361f983601b56c (patch) | |
tree | 9136f7de92d7d1f51b1aad570288df2e8a26cf8f /Lib | |
parent | 2fe77060eb2b322da925b50ffe3c471258736cee (diff) | |
download | cpython-f41406409e17344a471c28226c361f983601b56c.zip cpython-f41406409e17344a471c28226c361f983601b56c.tar.gz cpython-f41406409e17344a471c28226c361f983601b56c.tar.bz2 |
- Issue #2113: Fix error in subprocess.Popen if the select system call is
interrupted by a signal.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/subprocess.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 6065594..35970f8 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, |