Terminals 1323
62.12 Exercises
62-1. Implement isatty(). (You may find it useful to read the description of tcgetattr() in
Section 62.2.)
62-2. Implement ttyname().
62-3. Implement the getpass() function described in Section 8.5. (The getpass() function
can obtain a file descriptor for the controlling terminal by opening /dev/tty.)
62-4. Write a program that displays information indicating whether the terminal
referred to by standard input is in canonical or noncanonical mode. If in
noncanonical mode, then display the values of TIME and MIN.