On Tue, 11 Dec 2018 20:35:05 +0100, Sebastien Marie wrote:

> According to stdio.h, 6 = __SNBF | __SRD, so "unbuffered" and "OK to read".
>
> the feof() call returns false, the python code interpretes it as an error.
>
> When looking at fread(3) code in libc, I found that we doesn't set
> __SEOF when the FILE is unbuffered.

Yes, that is a bug.  The code should probably be calling __srefill(),
though we'd need to set _bf._base and _bf._size appropriately so
it doesn't use _nbuf.  Some care is required...

 - todd

Reply via email to