Message374794
I accidentally hit submit too early.
I tried changing the code in posixmodule.c to use lseek(), something like the following:
offset = lseek( in, 0, SEEK_CUR );
do {
ret = sendfile(...);
} while( ... );
lseek( in, offset, SEEK_SET );
... however, in addition to readfile not advancing the file pointer it also doesn't seem to cause an EOF condition. In my first attempt at the above I was doing this after the loop:
lseek( in, offset, SEEK_CUR );
... and it just kept advancing the file pointer well beyond the end of the file and sendfile() had absolutely no qualms about reading beyond the end of the file.
I even tried adding a read() after the 2nd lseek to see if I could force an EOF condition but that didn't do it. |
|
Date |
User |
Action |
Args |
2020-08-04 04:04:56 | phantal | set | recipients:
+ phantal, vstinner, christian.heimes, petriborg, blastwave, Jim Crigler |
2020-08-04 04:04:56 | phantal | set | messageid: <1596513896.14.0.030239368519.issue29269@roundup.psfhosted.org> |
2020-08-04 04:04:56 | phantal | link | issue29269 messages |
2020-08-04 04:04:56 | phantal | create | |
|