This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author niemeyer
Recipients
Date 2002-11-18.16:18:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=7887

You're right about EAGAIN. The behavior I mentioned seems to
be valid only for old Unixes, as presented here:

http://www.gnu.org/manual/glibc/html_mono/libc.html

So indeed we should check for both. OTOH, the above URL also
mentions that EAGAIN can happen in blocking situations as well:

"On some systems, reading a large amount of data from a
character special file can also fail with EAGAIN if the
kernel cannot find enough physical memory to lock down the
user's pages."

Also, the statement in the documentation you mention isn't
true even without my patch. We currently check for
"readbytes < requestedbytes" and break the loop if it
happens. Indeed, that's one of the reasons that
created the second problem I've mentioned. Enforcing this
behavior, I could see that mentioned in the URL above:

"Any condition that could result in EAGAIN can instead
result in a successful read which returns fewer bytes than
requested. Calling read again immediately would result in
EAGAIN."

Thusly, applying this patch we wouldn't be introducing a new
behavior, but just enforcing a single behavior in every case.
History
Date User Action Args
2007-08-23 13:59:21adminlinkissue521782 messages
2007-08-23 13:59:21admincreate