raise
self.stdin.close()
elif self.stdout:
- stdout = self.stdout.read()
+ stdout = _eintr_retry_call(self.stdout.read)
self.stdout.close()
elif self.stderr:
- stderr = self.stderr.read()
+ stderr = _eintr_retry_call(self.stderr.read)
self.stderr.close()
self.wait()
- return (stdout, stderr)
+ else:
+ if timeout is not None:
+ endtime = time.time() + timeout
+ else:
+ endtime = None
+
+ try:
+ stdout, stderr = self._communicate(input, endtime, timeout)
+ finally:
+ self._communication_started = True
- return self._communicate(input)
+ sts = self.wait(timeout=self._remaining_time(endtime))
+
+ return (stdout, stderr)
def poll(self):
Library
-------
++- Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors
++ if the process has only one pipe.
++
+- Issue #12467: warnings: fix a race condition if a warning is emitted at
+ shutdown, if globals()['__file__'] is None.
+
+- Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
+ instead of text mode using the locale encoding, to avoid encoding issues.
+
+- Issue #12451: runpy: run_path() now opens the Python script in binary mode,
+ instead of text mode using the locale encoding, to support other encodings
+ than UTF-8 (scripts using the coding cookie).
+
+- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
+ of the text mode (using the locale encoding) to avoid encoding issues.
+
- Issue #12147: Adjust the new-in-3.2 smtplib.send_message method for better
- conformance to the RFCs: correctly handle Sender and Resent headers.
+ conformance to the RFCs: correctly handle Sender and Resent- headers.
- Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
the garbage collector while the Heap lock is held.