Message125601
> 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. |
|
Date |
User |
Action |
Args |
2011-01-06 22:53:20 | loewis | set | recipients:
+ loewis, georg.brandl, nijel, pitrou, r.david.murray, neologix |
2011-01-06 22:53:18 | loewis | link | issue10824 messages |
2011-01-06 22:53:18 | loewis | create | |
|