[ python-Bugs-858253 ] EAGAIN when sys.stdin.readline()
SourceForge.net
noreply at sourceforge.net
Fri Dec 12 07:00:56 EST 2003
Bugs item #858253, was opened at 2003-12-11 07:12
Message generated for change (Comment added) made by gaul
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=858253&group_id=5470
Category: Extension Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Frallan the master Jedi (frallan)
Assigned to: Nobody/Anonymous (nobody)
Summary: EAGAIN when sys.stdin.readline()
Initial Comment:
$ cat test.py
import sys
print sys.stdin.readline()
$ python test.py | python test.py
Traceback (most recent call last):
File "test.py", line 2, in ?
print sys.stdin.readline()
IOError: [Errno 35] Resource temporarily unavailable
This happens about 3 times out of 5.
It happens under FreeBSD 5.1-RELEASE (SMP) and:
python-2.1.3
python-2.2.3
python-2.3.2
python-2.3.3c1
It does _not_ happen under Debian 3.0 or
FreeBSD 4.7-RELEASE (SMP).
According to read(2) this "error" should occur only when
the descriptor is in non-blocking mode. However as you
can see from the program it isn't. Further I have caught
the IOError and run fcntl(F_GETFL) on sys.stdin.fileno()
and the only flag set is O_RDWR.
----------------------------------------------------------------------
Comment By: Andrew Gaul (gaul)
Date: 2003-12-12 06:00
Message:
Logged In: YES
user_id=139865
Same on OpenBSD:
$ uname -a
OpenBSD owl 3.2 GENERIC#25 i386
$ python -V
Python 2.2.1
$ python test.py | python test.py
Traceback (most recent call last):
File "test.py", line 2, in ?
print sys.stdin.readline()
IOError: [Errno 35] Resource temporarily unavailable
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=858253&group_id=5470
More information about the Python-bugs-list
mailing list