Martin v. Löwis <mar...@v.loewis.de> added the comment:

> You'll see that read returns less that 100M bytes when interrupted.

I see.

> while len(data) < expected:
>     read(expected - len(data))
> 
> So we're sure it won't break under some systems/conditions.

I think this is not quite the idiom we should use if we want to deal
with signals: if read() returns an empty string, we have hit end-of-file.

If there is a signal before anything is read, we should catch the
exception and continue reading (which the loop doesn't do, either).

OTOH, if the signal was due to a user interrupt, we should raise an
exception, anyway, IMO - even if we've read some data already.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10824>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to