 | | In canonical mode, terminal input is processed in units of lines. A line is delimited by a newline (ASCII LF), an end-of-file character (ASCII EOT), or an end-of-line character (user defined). This means that a program attempting to read from the terminal will be suspended until an entire line has been typed. Furthermore, no matter how many characters are requested in the read call, at most one line will be returned. It is, of course, not necessary to read an entire line all at once; one or a few characters may be read at a time, and the operating system will satisfy the reads from the buffered input line. But it is important to understand that the first read request, regardless of its size, will not be satisfied until an entire line has been typed. | |
|