[Ecls-list] streams, FILE *s and flisten()
Brian Spilsbury
brian.spilsbury at gmail.com
Wed May 17 18:19:12 UTC 2006
Hello,
I've been poking around in the file code, and I think I've found a
non-trivial problem.
The streams are layered over ansi c FILE *'s, which is nice, but they
don't have any support for non-blocking io.
flisten() works by bypassing the FILE * and looking at the underlying
file descriptor/handle/etc, but this ignores anything that may be
buffered, so it's possible for flisten() to report that nothing is
readable without hang, when it is available.
More generally, the lack of non-blocking io with FILE *s may cause
problems for future coroutine or cooperative task based IO, etc.
So my question is: Is there significant value in using FILE * based io
rather than directly using file descriptors/handles/etc?
If there isn't, then I'll have a look at rewriting the io code that
way, at least for the posix targets.
Regards,
Brian.
More information about the ecl-devel
mailing list