Commit 786ddb2
committed
Fixed bug
[#521782] unreliable file.read() error handling
* Objects/fileobject.c
(file_read): Clear errors before leaving the loop in all situations,
and also check if some data was read before exiting the loop with an
EWOULDBLOCK exception.
* Doc/lib/libstdtypes.tex
* Objects/fileobject.c
Document that sometimes a read() operation can return less data than
what the user asked, if running in non-blocking mode.
* Misc/NEWS
Document the fix.1 parent 17c5a33 commit 786ddb2
3 files changed
Lines changed: 36 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
1208 | | - | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1209 | 1211 | | |
1210 | 1212 | | |
1211 | 1213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
744 | 758 | | |
745 | 759 | | |
746 | 760 | | |
| |||
774 | 788 | | |
775 | 789 | | |
776 | 790 | | |
777 | | - | |
778 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
779 | 799 | | |
780 | 800 | | |
781 | 801 | | |
782 | 802 | | |
783 | | - | |
| 803 | + | |
| 804 | + | |
784 | 805 | | |
| 806 | + | |
785 | 807 | | |
786 | 808 | | |
787 | 809 | | |
788 | 810 | | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
789 | 814 | | |
790 | 815 | | |
791 | 816 | | |
| |||
1518 | 1543 | | |
1519 | 1544 | | |
1520 | 1545 | | |
1521 | | - | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
1522 | 1549 | | |
1523 | 1550 | | |
1524 | 1551 | | |
| |||
0 commit comments