Aucbvax.2405
fa.unix-wizards
utzoo!decvax!ucbvax!c-alayto@CCA-UNIX
Wed Jul 22 06:59:41 1981
^D and <EOF>
From: c-alayto at CCA-UNIX (Alexis Layton)

What Dave Crocker <DCROCKER@UDEL> and others have called a bug is really
nothing of the sort.  My understand of UNIX typing conventions is as follows:
Most line terminating characters (i.e. newline) insert themselves into the
input buffer before causing the read(2) to return.  The function of ^D (or
for those of you who have changed it, whatever tchars.t_eofc is) is to cause
read(2) to return with the contents of the buffer WITHOUT inserting itself.
In the case that the buffer is empty, then read(2) returns 0, which is the
proper definition of end of file.  This is totally consistent and (I believe)
well documented.  (I only have the 4bsd documentation here, so I can't speak
for all UNICES.)


-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.