
18 Feb
2008
18 Feb
'08
8:26 a.m.
Bryan O'Sullivan wrote:
Stefan O'Rear wrote:
I'll bet that breaks horribly in the not-so-corner case of /dev/tty.
Actually, it doesn't. It seems to do a read behind the scenes if the buffer is empty, so it blocks until you type something.
Indeed, and this is why even an unbuffered Handle needs to have a 1-character buffer, an interesting fact I discovered when implementing the I/O library. Cheers, Simon