4.2bsd eof flag in stdio

Spencer W. Thomas thomas at utah-gr.UUCP
Sat Dec 1 05:04:31 AEST 1984


In article <266 at rlgvax.UUCP> guy at rlgvax.UUCP (Guy Harris) writes:
>It isn't just the nature of UNIX terminals.  Some DEC OSes use the same
>behavior; EDT terminates input mode with a ^Z, their EOF character.
>Actually, quoting the VMS manuals, "CTRL/Z - Echoes ^Z when CTRL/Z is
>typed as a *read terminator*.  *By convention*, CTRL/Z constitutes
>end-of-file."  This implies (although it may not be the case) that ^Z
>works in VMS exactly like ^D does in UNIX.  

Well, I don't know about VMS, but in TOPS-20, if you type ^Z, you see
the EOF, even if you type it in the middle of the line (unlike ^D on
Unix).  Personally, no matter what the manual says about "terminating
input" on ^D, and so on, I find that it is very confusing to naive users
that they must SOMETIMES type ^D twice, but other times, typing it once
suffices.  Just because you have gotten used to the behaviour, doesn't
mean it's right.

=Spencer



More information about the Comp.unix.wizards mailing list