[pypy-issue] [issue1179] nonblocking read from pipe should return what's available
Ben Darnell
tracker at bugs.pypy.org
Mon Jun 18 09:48:35 CEST 2012
New submission from Ben Darnell <ben at bendarnell.com>:
In cpython, reading from a non-blocking pipe will return whatever is available,
even
if it is less than the requested number of bytes. In pypy it raises an IOError
(EAGAIN) unless the full request can be satisfied. This is true for both
read(n)
and no-arg read(). While I suppose this is technically allowed by the vague "up
to
N bytes" in the spec, returning fewer bytes than requested is necessary in
practice
to read an unknown amount of data from a pipe without resorting to inefficient
one-
byte reads. The attached test case passes on cpython 2.7 and fails on pypy 1.9.
----------
files: pipetest.py
messages: 4450
nosy: bdarnell, pypy-issue
priority: bug
status: unread
title: nonblocking read from pipe should return what's available
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1179>
________________________________________
More information about the pypy-issue
mailing list