Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We have already noted that the terminal driver is capable of handling input in either canonical or noncanonical mode, depending on the setting of the ICANON flag. We now describe these two modes in detail. We then describe three useful terminal modes—cooked, cbreak, and raw—that were available in Seventh Edition UNIX, and show how these modes are emulated on modern UNIX systems by setting appropriate values in the termios structure.
Canonical mode input is enabled by setting the ICANON flag. Terminal input in canonical mode is distinguished by the following features: