On Thu, Oct 26, 2017 at 4:44 AM, Bernd Eckenfels <e...@zusammenkunft.net> wrote: > What is currently returned at the end of a stream? This looks like a > dangerous thing to do, if a existing implementation only read when something > is available it might never detect that it reached EOF.
At present it ultimately delegates (on UNIXy) to ioctl(fd, FIONREAD, xxx) which I guess will return an errno in this case. If that's the case then I agree that returning 0 is a smarter option. -- - DML