Index: Lib/subprocess.py =================================================================== --- Lib/subprocess.py (révision 88430) +++ Lib/subprocess.py (copie de travail) @@ -1193,9 +1193,13 @@ if errwrite is not None and errread is not None: os.close(errwrite) - # Wait for exec to fail or succeed; possibly raising exception - # Exception limited to 1M - data = _eintr_retry_call(os.read, errpipe_read, 1048576) + # Wait for exec to fail or succeed; possibly raising exception. + # The exception is unlikely: start with a buffer of 1 byte to + # avoid the creation of a buffer of 1 MB. + data = _eintr_retry_call(os.read, errpipe_read, 1) + if data: + # Exception limited to 1M + data += _eintr_retry_call(os.read, errpipe_read, 1048575) finally: # be sure the FD is closed no matter what os.close(errpipe_read)