|
|
When a terminal-device-file is opened, it normally causes the process to wait until a connection is established. In practice, application-programs seldom open such files; instead, at system-initialization time special-programs open terminal-device-files as the ``standard input'', ``standard output'' and ``standard error'' files (see Intro(3S)).
Opening a terminal-device-file with the flag O_NONBLOCK clear on the open system call causes the process to block until the terminal-device is ready and available (see open(2)). The flag CLOCAL can also affect the open system call (see ``Control modes'' in termio(7)).