1 .\" $NetBSD: termios.4,v 1.32 2006/10/13 20:31:27 wiz Exp $
3 .\" Copyright (c) 1991, 1992, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)termios.4 8.4 (Berkeley) 4/19/94
37 .Nd general terminal line discipline
41 This describes a general terminal line discipline that is
42 supported on tty asynchronous communication ports.
43 .Ss Opening a Terminal Device File
44 When a terminal file is opened, it normally causes the process to wait
45 until a connection is established.
46 For most hardware, the presence
47 of a connection is indicated by the assertion of the hardware
52 structure associated with the terminal file has the
54 flag set in the cflag, or if the
58 call, then the open will succeed even without a connection being present.
60 In practice, applications seldom open these files; they are opened
61 by special programs, such as
65 and become an application's standard input, output, and error files.
66 .Ss Job Control in a Nutshell
67 Every process is associated with a particular process group and session.
68 The grouping is hierarchical: every member of a particular process group is a
69 member of the same session.
70 This structuring is used in managing groups
71 of related processes for purposes of
72 .\" .Gw "job control" ;
75 ability from the keyboard (or from program control) to simultaneously
77 a complex command (a command composed of one or more related
80 The grouping into process groups allows delivering
81 of signals that stop or start the group as a whole, along with
82 arbitrating which process group has access to the single controlling
84 The grouping at a higher layer into sessions is to restrict
85 the job control related signals and system calls to within processes
86 resulting from a particular instance of a "login".
88 Typically, a session is created when a user logs in, and the login
89 terminal is set up to be the controlling terminal; all processes
90 spawned from that login shell are in the same session, and inherit
91 the controlling terminal.
92 A job control shell operating interactively (that is, reading
93 commands from a terminal) normally groups related processes together
94 by placing them into the same process group.
95 A set of processes in the same process group
96 is collectively referred to as a "job".
98 When the foreground process group of the terminal is the same as
99 the process group of a particular job, that job is said to be in the
101 When the process group of the terminal is different than the process
102 group of a job (but is still the controlling terminal), that job
106 Normally the shell reads a command and starts the job that implements
108 If the command is to be started in the foreground (typical), it
109 sets the process group of the terminal to the process group
110 of the started job, waits for the job to complete, and then
111 sets the process group of the terminal back to its own process
112 group (it puts itself into the foreground).
114 If the job is to be started in the background (as denoted by the
115 shell operator "\*[Am]"), it never changes the process group of the
116 terminal and doesn't wait for the job to complete (that is, it
117 immediately attempts to read the next command).
119 If the job is started in the foreground, the user may
120 type a character (usually
122 which generates the terminal stop signal
124 and has the affect of stopping the entire job.
125 The shell will notice that the job stopped (see
127 and will resume running after placing itself in the foreground.
129 The shell also has commands for placing stopped jobs in the background,
130 and for placing stopped or background jobs into the foreground.
131 .Ss Orphaned Process Groups
132 An orphaned process group is a process group that has no process
133 whose parent is in a different process group, yet is in the same
135 Conceptually it means a process group that doesn't have
136 a parent that could do anything if it were to be stopped.
138 the initial login shell is typically in an orphaned process group.
139 Orphaned process groups are immune to keyboard generated stop
140 signals and job control signals resulting from reads or writes to the
141 controlling terminal.
142 .Ss The Controlling Terminal
143 A terminal may belong to a process as its controlling terminal.
145 process of a session that has a controlling terminal has the same
146 controlling terminal.
147 A terminal may be the controlling terminal for at
149 The controlling terminal for a session is allocated by
150 the session leader by issuing the
153 A controlling terminal
154 is never acquired by merely opening a terminal device file.
155 When a controlling terminal becomes
156 associated with a session, its foreground process group is set to
157 the process group of the session leader.
159 The controlling terminal is inherited by a child process during a
162 A process relinquishes its controlling terminal when it
163 creates a new session with the
165 function; other processes
166 remaining in the old session that had this terminal as their controlling
167 terminal continue to have it.
168 A process does not relinquish its
169 controlling terminal simply by closing all of its file descriptors
170 associated with the controlling terminal if other processes continue to
173 When a controlling process terminates, the controlling terminal is
174 disassociated from the current session, allowing it to be acquired by a
176 Subsequent access to the terminal by other processes
177 in the earlier session will be denied, with attempts to access the
178 terminal treated as if modem disconnect had been sensed.
179 .Ss Terminal Access Control
180 If a process is in the foreground process group of its controlling
181 terminal, read operations are allowed.
182 Any attempts by a process
183 in a background process group to read from its controlling terminal
189 following special cases apply: If the reading process is ignoring or
192 signal, or if the process group of the reading process is orphaned,
198 and no signal is sent.
199 The default action of the
201 signal is to stop the
202 process to which it is sent.
204 If a process is in the foreground process group of its controlling
205 terminal, write operations are allowed.
206 Attempts by a process in a background process group to write to its
207 controlling terminal will cause the process group to be sent a
209 signal unless one of the following special cases apply: If
214 is set and the process is ignoring or blocking the
216 signal, the process is allowed to write to the terminal and the
221 is set, and the process group of
222 the writing process is orphaned, and the writing process is not ignoring
230 and no signal is sent.
232 Certain calls that set terminal parameters are treated in the same
233 fashion as write, except that
235 is ignored; that is, the effect is
236 identical to that of terminal writes when
239 .Ss Input Processing and Reading Data
240 A terminal device associated with a terminal device file may operate in
241 full-duplex mode, so that data may arrive even while output is occurring.
242 Each terminal device file has associated with it an input queue, into
243 which incoming data is stored by the system before being read by a
245 The system imposes a limit,
246 .Pf \&{ Dv MAX_INPUT Ns \&} ,
248 bytes that may be stored in the input queue.
249 The behavior of the system
250 when this limit is exceeded depends on the setting of the
255 If this flag is set, the terminal
259 character each time a character is received
260 while the input queue is full.
261 Otherwise, the input queue is flushed
262 upon receiving the character.
264 Two general kinds of input processing are available, determined by
265 whether the terminal device file is in canonical mode or noncanonical mode.
267 input characters are processed according to the
272 Such processing can include echoing, which
273 in general means transmitting input characters immediately back to the
274 terminal when they are received from the terminal.
275 This is useful for terminals that can operate in full-duplex mode.
277 The manner in which data is provided to a process reading from a terminal
278 device file is dependent on whether the terminal device file is in
279 canonical or noncanonical mode.
281 Another dependency is whether the
289 flag is clear, then the read request is
290 blocked until data is available or a signal has been received.
293 flag is set, then the read request is completed, without
294 blocking, in one of three ways:
295 .Bl -enum -offset indent
297 If there is enough data available to satisfy the entire request,
298 and the read completes successfully the number of
299 bytes read is returned.
301 If there is not enough data available to satisfy the entire
302 request, and the read completes successfully, having read as
303 much data as possible, the number of bytes read is returned.
305 If there is no data available, the read returns -1, with
310 When data is available depends on whether the input processing mode is
311 canonical or noncanonical.
312 .Ss Canonical Mode Input Processing
313 In canonical mode input processing, terminal input is processed in units
315 A line is delimited by a newline
317 character, an end-of-file
319 character, or an end-of-line
323 .Sx "Special Characters"
329 This means that a read request will
330 not return until an entire line has been typed, or a signal has been
332 Also, no matter how many bytes are requested in the read call,
333 at most one line is returned.
334 It is not, however, necessary to
335 read a whole line at once; any number of bytes, even one, may be
336 requested in a read without losing information.
338 .Pf \&{ Dv MAX_CANON Ns \&}
340 number of bytes in a line.
341 The behavior of the system when this limit is
342 exceeded is the same as when the input queue limit
343 .Pf \&{ Dv MAX_INPUT Ns \&} ,
346 Erase and kill processing occur when either of two special characters,
352 .Sx "Special Characters section" ) ,
354 This processing affects data in the input queue that has not yet been
355 delimited by a newline
361 This un-delimited data makes up the current line.
364 character deletes the last
365 character in the current line, if there is any.
368 character deletes all data in the current line, if there is any.
373 characters have no effect if there is no data in the current line.
378 characters themselves are not placed in the input
380 .Ss Noncanonical Mode Input Processing
381 In noncanonical mode input processing, input bytes are not assembled into
382 lines, and erase and kill processing does not occur.
389 array are used to determine how to
390 process the bytes received.
393 represents the minimum number of bytes that should be received when the
395 system call successfully returns.
397 is a timer of 0.1 second
398 granularity that is used to time out bursty and short term data
403 .Dv \&{ Dv MAX_INPUT Ns \&} ,
405 request is undefined.
406 The four possible values for
411 their interactions are described below.
412 .Ss "Case A: VMIN \*[Gt] 0, VTIME \*[Gt] 0"
415 serves as an inter-byte timer and is activated after
416 the first byte is received.
417 Since it is an inter-byte timer, it is reset
418 after a byte is received.
419 The interaction between
424 follows: as soon as one byte is received, the inter-byte timer is
428 bytes are received before the inter-byte timer expires
429 (remember that the timer is reset upon receipt of each byte), the read is
431 If the timer expires before
433 bytes are received, the
434 characters received to that point are returned to the user.
437 expires at least one byte is returned because the timer would
438 not have been enabled unless a byte was received.
443 \*[Gt] 0) the read blocks until the
448 activated by the receipt of the first byte, or a signal is received.
449 If data is in the buffer at the time of the
451 the result is as if data had been received immediately after the
453 .Ss "Case B: VMIN \*[Gt] 0, VTIME = 0"
454 In this case, since the value of
456 is zero, the timer plays no role
460 A pending read is not satisfied until
462 bytes are received (i.e., the pending read blocks until
465 are received), or a signal is received.
466 A program that uses this case to
467 read record-based terminal
469 may block indefinitely in the read
471 .Ss "Case C: VMIN = 0, VTIME \*[Gt] 0"
476 no longer represents an inter-byte timer.
477 It now serves as a read timer that is activated as soon as the
478 read function is processed.
479 A read is satisfied as soon as a single byte is received or the
481 Note that in this case if the timer expires, no bytes are returned.
482 If the timer does not
483 expire, the only way the read can be satisfied is if a byte is received.
484 In this case the read will not block indefinitely waiting for a
485 byte; if no byte is received within
487 seconds after the read is initiated, the read returns a value of
488 zero, having read no data.
489 If data is in the buffer at the time of the read, the timer is
490 started as if data had been received immediately after the read.
491 .Ss Case D: VMIN = 0, VTIME = 0
492 The minimum of either the number of bytes requested or the number of
493 bytes currently available is returned without waiting for more
495 If no characters are available, read returns a
496 value of zero, having read no data.
497 .Ss Writing Data and Output Processing
498 When a process writes one or more bytes to a terminal device file, they
499 are processed according to the
504 The implementation may provide a buffering mechanism; as such, when
507 completes, all of the bytes written have been scheduled for
508 transmission to the device, but the transmission will not necessarily
510 .\" See also .Sx "6.4.2" for the effects of
513 .Ss Special Characters
514 Certain characters have special functions on input or output or both.
515 These functions are summarized as follows:
516 .Bl -tag -width indent
518 Special character on input and is recognized if the
525 signal which is sent to all processes in the foreground
526 process group for which the terminal is the controlling
533 discarded when processed.
535 Special character on input and is recognized if the
541 sent to all processes in the foreground process group
542 for which the terminal is the controlling terminal.
547 character is discarded when
550 Special character on input and is recognized if the
553 Erases the last character in the
555 .Sx "Canonical Mode Input Processing" .
556 It does not erase beyond
557 the start of a line, as delimited by an
568 discarded when processed.
570 Special character on input and is recognized if the
573 Deletes the entire line, as
584 character is discarded when processed.
586 Special character on input and is recognized if the
589 When received, all the bytes
590 waiting to be read are immediately passed to the
591 process, without waiting for a newline, and the
594 Thus, if there are no bytes waiting (that
597 occurred at the beginning of a line), a byte
598 count of zero is returned from the
600 representing an end-of-file indication.
606 character is discarded when processed.
608 Special character on input and is recognized if the
611 It is the line delimiter
614 Special character on input and is recognized if the
617 Is an additional line delimiter,
623 flag is enabled, receipt of the
627 signal to be sent to all processes in the
628 foreground process group for which the terminal is the
629 controlling terminal, and the
632 discarded when processed.
634 Special character on both input and output and is
639 (input control) flag is set.
640 Can be used to temporarily suspend output.
641 It is useful with fast terminals to
642 prevent output from disappearing before it can be read.
647 character is discarded when
650 Special character on both input and output and is
656 control) flag is set.
657 Can be used to resume output that
658 has been suspended by a
665 character is discarded when processed.
667 Special character on input and is recognized if the
669 flag is set; it is the
680 is not set, this character is translated into a
683 has the same effect as a
688 The following special characters are extensions defined by this
689 system and are not a part of
692 .Bl -tag -width indent
700 Special character on input and is recognized if the
703 Erases the last word in the current
704 line according to one of two algorithms.
707 flag is not set, first any preceding whitespace is
708 erased, and then the maximal sequence of non-whitespace
712 is set, first any preceding whitespace is erased, and then the
713 maximal sequence of alphabetic/underscores or non alphabetic/underscores.
714 As a special case in this second algorithm, the first previous
715 non-whitespace character is skipped in determining whether the
716 preceding word is a sequence of alphabetic/underscores.
717 This sounds confusing but turns out to be quite practical.
719 Special character on input and is recognized if the
722 Causes the current input edit line
725 Has similar actions to the
727 character, except that
730 signal is delivered when one of the processes
731 in the foreground process group issues a
733 to the controlling terminal.
735 Special character on input and is recognized if the
738 Receipt of this character causes the next
739 character to be taken literally.
741 Special character on input and is recognized if the
744 Receipt of this character toggles the flushing
747 Special character on input and is recognized if the
750 Receipt of this character causes a
752 signal to be sent to the foreground process group of the
757 causes the kernel to write a status message to the terminal
758 that displays the current load average, the name of the
759 command in the foreground, its process ID, the symbolic
760 wait channel, the number of user and system seconds used,
761 the percentage of CPU the process is getting, and the resident
762 set size of the process.
769 characters cannot be changed.
770 The values for all the remaining characters can be set and are
771 described later in the document under
772 Special Control Characters.
775 character functions associated with changeable special control characters
776 can be disabled individually by setting their value to
777 .Dv {_POSIX_VDISABLE};
779 .Sx "Special Control Characters" .
781 If two or more special characters have the same value, the function
782 performed when that character is received is undefined.
784 If a modem disconnect is detected by the terminal interface for a
785 controlling terminal, and if
792 signal is sent to the controlling
793 process associated with the terminal.
794 Unless other arrangements have
795 been made, this causes the controlling process to terminate.
796 Any subsequent call to the
798 function returns the value zero, indicating end of file.
799 Thus, processes that read a terminal file and test for end-of-file
800 can terminate appropriately after a disconnect.
803 .\" condition specified in 6.1.1.4 that applies
804 .\" when the implementation supports job control also exists, it is
805 .\" unspecified whether the
812 to the terminal device returns -1, with
816 until the device is closed.
817 .Sh GENERAL TERMINAL INTERFACE
818 .Ss Closing a Terminal Device File
819 The last process to close a terminal device file causes any output
820 to be sent to the device and any input to be discarded.
823 is set in the control modes, and the communications port supports a
824 disconnect function, the terminal device performs a disconnect.
825 .Ss Parameters That Can Be Set
826 Routines that need to control certain terminal
831 structure as defined in the header
833 This structure contains minimally four scalar elements of bit flags
834 and one array of special characters.
835 The scalar flag elements are named:
841 The character array is named
843 and its maximum index is
848 field describe the basic
849 terminal input control, and are composed of
852 .Bl -tag -width IMAXBEL -offset indent -compact
854 /* ignore BREAK condition */
856 /* map BREAK to SIGINT */
858 /* ignore (discard) parity errors */
860 /* mark parity and framing errors */
862 /* enable checking of parity errors */
864 /* strip 8th bit off chars */
870 /* map CR to NL (ala CRMOD) */
872 /* enable output flow control */
874 /* enable input flow control */
876 /* any char will restart after stop */
878 /* ring bell on input queue full */
881 In the context of asynchronous serial data transmission, a break
882 condition is defined as a sequence of zero-valued bits that continues for
883 more than the time to send one byte.
884 The entire sequence of zero-valued
885 bits is interpreted as a single break condition, even if it continues for
886 a time equivalent to more than one byte.
887 In contexts other than
888 asynchronous serial data transmission the definition of a break condition
889 is implementation defined.
893 is set, a break condition detected on input is ignored, that
894 is, not put on the input queue and therefore not read by any process.
899 is set, the break condition flushes the
900 input and output queues and if the terminal is the controlling terminal
901 of a foreground process group, the break condition generates a
904 signal to that foreground process group.
909 is set, a break condition is read as a single
920 is set, a byte with a framing or parity error (other than
927 is not set, a byte with a framing or parity
928 error (other than break) is given to the application as the
929 three-character sequence
936 flag preceding each sequence and X is the data of the character received
938 To avoid ambiguity in this case, if
943 is given to the application as
951 is set, a framing or parity error (other than
952 break) is given to the application as a single character
957 is set, input parity checking is enabled.
960 is not set, input parity checking is disabled, allowing output
961 parity generation without input parity errors.
962 Note that whether input parity checking is
963 enabled or disabled is independent of whether parity detection is enabled
965 .Sx "Control Modes" ) .
966 If parity detection is enabled but input
967 parity checking is disabled, the hardware to which the terminal is
968 connected recognizes the parity bit, but the terminal special file
969 does not check whether this bit is set correctly or not.
973 is set, valid input bytes are first stripped to seven bits,
974 otherwise all eight bits are processed.
980 character is translated into a
987 character is ignored (not
1002 is set, start/stop output control is enabled.
1005 character suspends output and a received
1011 is also set, then any character may restart output.
1019 read, but merely perform flow control functions.
1027 characters are read.
1031 is set, start/stop input control is enabled.
1032 The system shall transmit one or more
1034 characters, which are intended to cause the
1035 terminal device to stop transmitting data, as needed to prevent the input
1036 queue from overflowing and causing the undefined behavior described in
1037 .Sx "Input Processing and Reading Data" ,
1038 and shall transmit one or more
1040 characters, which are
1041 intended to cause the terminal device to resume transmitting data, as
1042 soon as the device can continue transmitting data without risk of
1043 overflowing the input queue.
1044 The precise conditions under which
1048 characters are transmitted are implementation defined.
1052 is set and the input queue is full, subsequent input shall cause an
1055 character to be transmitted to the output queue.
1057 The initial input control value after
1059 is implementation defined.
1063 field describe the basic terminal output control,
1064 and are composed of the following masks:
1066 .Bl -tag -width OXTABS -offset indent -compact
1068 /* enable following output processing */
1070 /* map NL to CR-NL (ala
1076 /* expand tabs to spaces */
1083 /* do not transmit CRs on column 0 */
1085 /* on the terminal NL performs the CR function */
1090 is set, the remaining flag masks are interpreted as follows;
1091 otherwise characters are transmitted without change.
1095 is set, newlines are translated to carriage return, linefeeds.
1099 is set, carriage returns are translated to newlines.
1103 is set, tabs are expanded to the appropriate number of
1104 spaces (assuming 8 column tab stops).
1111 are discarded on output.
1115 is set, no CR character is transmitted when at column 0 (first position).
1119 is set, the NL character is assumed to do the carriage-return function;
1120 the column pointer will be set to 0.
1124 field describe the basic
1125 terminal hardware control, and are composed of the
1128 specified are supported by all hardware.
1130 .Bl -tag -width CRTSXIFLOW -offset indent -compact
1132 /* character size mask */
1134 /* 5 bits (pseudo) */
1142 /* send 2 stop bits */
1144 /* enable receiver */
1148 /* odd parity, else even */
1150 /* hang up on last close */
1152 /* ignore modem status lines */
1156 flow control of output */
1158 /* logically the same as
1163 /* RTS flow control of input */
1165 /* flow control output via Carrier */
1170 bits specify the byte size in bits for both transmission and
1176 and compared with the
1183 This size does not include the parity bit, if any.
1186 is set, two stop bits are used, otherwise one stop bit.
1187 For example, at 110 baud, two stop bits are normally used.
1191 is set, the receiver is enabled.
1192 Otherwise, no character is received.
1193 Not all hardware supports this bit.
1194 In fact, this flag is pretty silly and if it were not part of the
1196 specification it would be omitted.
1200 is set, parity generation and detection are enabled and a parity
1201 bit is added to each character.
1202 If parity is enabled,
1204 specifies odd parity if set, otherwise even parity is used.
1208 is set, the modem control lines for the port are lowered when the
1209 last process with the port open closes the port or the process terminates.
1210 The modem connection is broken.
1214 is set, a connection does not depend on the state of the modem
1218 is clear, the modem status lines are monitored.
1220 Under normal circumstances, a call to the
1222 function waits for the modem connection to complete.
1230 function returns immediately without waiting for the connection.
1235 flag has been set on the port then the
1237 flag will automatically be set on every open.
1243 flags are currently unused.
1246 which has the combined effect, is implemented.
1249 support is hardware and driver dependent.
1250 Check the specific port driver manual page to see if hardware flow
1251 control is supported on the port you are using.
1255 .Dv TIOCFLAG_CRTSCTS
1256 flag has been set on the port then the
1258 flag will automatically be set on every open.
1262 is set then output flow control is controlled by the state
1268 flag has been set on the port then the
1270 flag will automatically be set on every open.
1272 If the object for which the control modes are set is not an asynchronous
1273 serial connection, some of the modes may be ignored; for example, if an
1274 attempt is made to set the baud rate on a network connection to a
1275 terminal on another host, the baud rate may or may not be set on the
1276 connection between that terminal and the machine it is directly connected
1281 field describe the control of
1282 various functions, and are composed of the following
1285 .Bl -tag -width NOKERNINFO -offset indent -compact
1287 /* visual erase for line kill */
1289 /* visually erase chars */
1291 /* enable echoing */
1299 /* visual erase mode for hardcopy */
1301 /* echo control chars as ^(Char) */
1309 /* canonicalize input lines */
1321 /* external processing */
1323 /* stop background jobs from output */
1325 /* output being flushed (state) */
1327 /* no kernel output from
1331 /* re-echo input buffer at next read */
1333 /* don't flush output on signal */
1338 is set, input characters are echoed back to the terminal.
1341 is not set, input characters are not echoed.
1349 character causes the terminal to erase the last character in the
1350 current line from the display, if possible.
1351 If there is no character to erase, an implementation may echo
1352 an indication that this was the case or do nothing.
1361 the current line to be discarded and the system echoes the
1374 the current line to be discarded and the system causes
1376 to erase the line from the display.
1382 are set, the system assumes
1383 that the display is a printing device and prints a
1384 backslash and the erased characters when processing
1386 characters, followed by a forward slash.
1390 is set, the system echoes control characters
1391 in a visible fashion using a caret followed by the control character.
1395 is set, the system uses an alternative algorithm
1396 for determining what constitutes a word when processing
1407 character echoes even if
1413 is set, canonical processing is enabled.
1415 erase and kill edit functions, and the assembly of input characters into
1422 .Sx "Canonical Mode Input Processing" .
1426 is not set, read requests are satisfied directly from the input
1428 A read is not satisfied until at least
1431 received or the timeout value
1433 expired between bytes.
1434 The time value represents tenths of seconds.
1436 .Sx "Noncanonical Mode Input Processing"
1441 is set, each input character is checked against the special
1448 If an input character matches one of these control characters, the
1449 function associated with that character is performed.
1452 is not set, no checking is done.
1453 Thus these special input functions are possible only if
1459 is set, implementation-defined functions are recognized
1460 from the input data.
1463 being set interacts with
1469 is implementation defined.
1473 implementation-defined functions are not recognized, and the
1474 corresponding input characters are not processed as described for
1483 is set, the normal flush of the input and output queues
1496 is sent to the process group of a process that tries to write to
1497 its controlling terminal if it is not in the foreground process group for
1499 This signal, by default, stops the members of the process group.
1500 Otherwise, the output generated by that process is output to the
1501 current output stream.
1502 Processes that are blocking or ignoring
1504 signals are excepted and allowed to produce output and the
1511 is set, the kernel does not produce a status message
1516 .Ss Special Control Characters
1517 The special control characters values are defined by the array
1519 This table lists the array index, the corresponding special character,
1520 and the system default value.
1521 For an accurate list of
1522 the system defaults, consult the header file
1523 .Aq Pa ttydefaults.h .
1525 .Bl -column "Index Name" "Special Character" -offset indent -compact
1526 .It Em "Index Name Special Character Default Value"
1527 .It Dv VEOF Ta EOF Ta \&^D
1528 .It Dv VEOL Ta EOL Ta _POSIX_VDISABLE
1529 .It Dv VEOL2 Ta EOL2 Ta _POSIX_VDISABLE
1530 .It Dv VERASE Ta ERASE Ta \&^? Ql \&\e177
1531 .It Dv VWERASE Ta WERASE Ta \&^W
1532 .It Dv VKILL Ta KILL Ta \&^U
1533 .It Dv VREPRINT Ta REPRINT Ta \&^R
1534 .It Dv VINTR Ta INTR Ta \&^C
1535 .It Dv VQUIT Ta QUIT Ta \&^\e\e Ql \&\e34
1536 .It Dv VSUSP Ta SUSP Ta \&^Z
1537 .It Dv VDSUSP Ta DSUSP Ta \&^Y
1538 .It Dv VSTART Ta START Ta \&^Q
1539 .It Dv VSTOP Ta STOP Ta \&^S
1540 .It Dv VLNEXT Ta LNEXT Ta \&^V
1541 .It Dv VDISCARD Ta DISCARD Ta \&^O
1542 .It Dv VMIN Ta --- Ta \&1
1543 .It Dv VTIME Ta --- Ta \&0
1544 .It Dv VSTATUS Ta STATUS Ta \&^T
1548 value of one of the changeable special control characters (see
1549 .Sx "Special Characters" )
1551 .Dv {_POSIX_VDISABLE} ,
1552 that function is disabled; that is, no input
1553 data is recognized as the disabled special character.
1557 not set, the value of
1558 .Dv {_POSIX_VDISABLE}
1559 has no special meaning for the
1567 The initial values of the flags and control characters
1570 is set according to the values in the header
1571 .Aq Pa sys/ttydefaults.h .