David Brown wrote:
Also, ^D isn't "close stream", it's EOF.

Actually it's "end of transmission", which is exactly how UNIX tty drivers treat it.

It does not close the stream.  All it does is cause a 'read' to return 0
bytes.

No, it causes read() to return whatever has been typed up till now. If you don't type anything before the EOT, then you get zero bytes back, which UNIX programs usually interpret as EOF. If you type "abc^D", your read will return 3 bytes without a newline.

--
  Darren New / San Diego, CA, USA (PST)
    It's not feature creep if you put it
    at the end and adjust the release date.

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to