classification
Title: sys.stdin.read won't return on EOF
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson
Priority: release blocker Keywords:

Created on 2008-08-01 16:06 by benjamin.peterson, last changed 2008-08-01 16:25 by benjamin.peterson. This issue is now closed.

Messages (2)
msg70565 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-08-01 16:06
$ ./python.exe -c "import sys; sys.stdin.read()"
^D

In 2.6, this returns, but in 3.0, it still hangs despite having gotten
EOF. When a KeyboardInterrupt is given, this is the traceback:

^CTraceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/temp/python/py3k/Lib/io.py", line 1692, in read
    decoder.decode(self.buffer.read(), final=True))
  File "/temp/python/py3k/Lib/io.py", line 923, in read
    chunk = self.raw.read()
KeyboardInterrupt
msg70566 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-08-01 16:25
I'm sorry. This is my oversight.
History
Date User Action Args
2008-08-01 16:25:41benjamin.petersonsetstatus: open -> closed
resolution: not a bug
messages: + msg70566
2008-08-01 16:06:07benjamin.petersoncreate