[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug with load
- From: Sam Roberts <vieuxtech@...>
- Date: Mon, 21 Feb 2011 10:58:07 -0800
On Fri, Feb 18, 2011 at 3:04 AM, Tony Finch <email@example.com> wrote:
> I note that if the reader function is a simple wrapper around the read(2)
> syscall then it is possible for it to return EOF then on a subsequent call
> return some data, e.g. if the input is a terminal.
read() should block on read from a terminal -- or if the fd is set
non-blocking, return -1.
read() will return zero on EOF, and then return some positive value if
more is written to the end of file, but that's pretty pathological.