[New-bugs-announce] [issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read

Vitaly report at bugs.python.org
Tue Sep 11 11:06:17 CEST 2012


New submission from Vitaly:

subprocess.Popen (at least on 2.6.7) reads the pipe incorrectly: It doesn't loop to read all the data until EOF -- it only loops over EINTR until it gets a single successful os.read() call.  However, since this is a pipe read (not a real file read), the system doesn't guarantee that the blocking read will read everything up to requested read size or EOF, whichever comes first.  So, the single os.read call could return a partial read, and the subsequent un-pickling of the exception would fail/crash.

Sorry, I can't submit a patch as I am merely a Python user, not a Python developer, and it would take me too long to set up and figure out Python build just for this one issue.

----------
components: Library (Lib)
messages: 170279
nosy: vitaly
priority: normal
severity: normal
status: open
title: subprocess.Popen reads errpipe_read incorrectly, can result in short read
type: crash
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15918>
_______________________________________


More information about the New-bugs-announce mailing list