Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web.
|
2009-09-06 What typing ^D really does on UnixEveryone knows what ^D does on Unix; it generates an end of file,
so that But this is just the usual effects of typing ^D; it is not what it actually does. What ^D actually does is simple but subtle:
Normally doing a Typing ^D causes the tty driver to stop waiting for a newline and
immediately return from the (Other programs will immediately process the partial line with no
buffering; Once you've typed ^D on a partial line, that portion of the line is immutable because it's already been given to the program. Most Unixes won't let you backspace over such partial lines; effectively they become output, not input. (Note that modern shells are not good examples of this, because they don't do line-buffered input; to support command line editing, they switch terminal input into an uninterpreted mode. So they get the raw ^D and can do whatever they want with it, and they can let you edit as much of the pending line as they want.) (One comment.)
unix/TypingEOFEffects written at 01:10:49; Add Comment
|
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |