Commit 7641b1c9 authored by Gregory P. Smith's avatar Gregory P. Smith

(backport from trunk r64756)

Issue #2113: Fix error in subprocess.Popen if the select system call is
interrupted by a signal.
parent 03e5182d
...@@ -1153,7 +1153,12 @@ class Popen(object): ...@@ -1153,7 +1153,12 @@ class Popen(object):
input_offset = 0 input_offset = 0
while read_set or write_set: 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: if self.stdin in wlist:
# When select has indicated that the file is writable, # When select has indicated that the file is writable,
......
...@@ -130,6 +130,10 @@ Library ...@@ -130,6 +130,10 @@ Library
argument in python 2.5, this broke code that subclassed Popen to include its argument in python 2.5, this broke code that subclassed Popen to include its
own poll method. Fixed my moving _deadstate to an _internal_poll method. own poll method. Fixed my moving _deadstate to an _internal_poll method.
- Issue #2113: Fix error in subprocess.Popen if the select system call is
interrupted by a signal.
Extension Modules Extension Modules
----------------- -----------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment