1*1031c584SApple OSS Distributions.\" $NetBSD: termios.4,v 1.5 1994/11/30 16:22:36 jtc Exp $ 2*1031c584SApple OSS Distributions.\" 3*1031c584SApple OSS Distributions.\" Copyright (c) 1991, 1992, 1993 4*1031c584SApple OSS Distributions.\" The Regents of the University of California. All rights reserved. 5*1031c584SApple OSS Distributions.\" 6*1031c584SApple OSS Distributions.\" Redistribution and use in source and binary forms, with or without 7*1031c584SApple OSS Distributions.\" modification, are permitted provided that the following conditions 8*1031c584SApple OSS Distributions.\" are met: 9*1031c584SApple OSS Distributions.\" 1. Redistributions of source code must retain the above copyright 10*1031c584SApple OSS Distributions.\" notice, this list of conditions and the following disclaimer. 11*1031c584SApple OSS Distributions.\" 2. Redistributions in binary form must reproduce the above copyright 12*1031c584SApple OSS Distributions.\" notice, this list of conditions and the following disclaimer in the 13*1031c584SApple OSS Distributions.\" documentation and/or other materials provided with the distribution. 14*1031c584SApple OSS Distributions.\" 3. All advertising materials mentioning features or use of this software 15*1031c584SApple OSS Distributions.\" must display the following acknowledgement: 16*1031c584SApple OSS Distributions.\" This product includes software developed by the University of 17*1031c584SApple OSS Distributions.\" California, Berkeley and its contributors. 18*1031c584SApple OSS Distributions.\" 4. Neither the name of the University nor the names of its contributors 19*1031c584SApple OSS Distributions.\" may be used to endorse or promote products derived from this software 20*1031c584SApple OSS Distributions.\" without specific prior written permission. 21*1031c584SApple OSS Distributions.\" 22*1031c584SApple OSS Distributions.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*1031c584SApple OSS Distributions.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*1031c584SApple OSS Distributions.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*1031c584SApple OSS Distributions.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*1031c584SApple OSS Distributions.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*1031c584SApple OSS Distributions.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*1031c584SApple OSS Distributions.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*1031c584SApple OSS Distributions.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*1031c584SApple OSS Distributions.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*1031c584SApple OSS Distributions.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*1031c584SApple OSS Distributions.\" SUCH DAMAGE. 33*1031c584SApple OSS Distributions.\" 34*1031c584SApple OSS Distributions.\" @(#)termios.4 8.4 (Berkeley) 4/19/94 35*1031c584SApple OSS Distributions.\" 36*1031c584SApple OSS Distributions.Dd April 19, 1994 37*1031c584SApple OSS Distributions.Dt TERMIOS 4 38*1031c584SApple OSS Distributions.Os BSD 4 39*1031c584SApple OSS Distributions.Sh NAME 40*1031c584SApple OSS Distributions.Nm termios 41*1031c584SApple OSS Distributions.Nd general terminal line discipline 42*1031c584SApple OSS Distributions.Sh SYNOPSIS 43*1031c584SApple OSS Distributions.Fd #include <termios.h> 44*1031c584SApple OSS Distributions.Sh DESCRIPTION 45*1031c584SApple OSS DistributionsThis describes a general terminal line discipline that is 46*1031c584SApple OSS Distributionssupported on tty asynchronous communication ports. 47*1031c584SApple OSS Distributions.Ss Opening a Terminal Device File 48*1031c584SApple OSS DistributionsWhen a terminal file is opened, it normally causes the process to wait 49*1031c584SApple OSS Distributionsuntil a connection is established. For most hardware, the presence 50*1031c584SApple OSS Distributionsof a connection is indicated by the assertion of the hardware 51*1031c584SApple OSS Distributions.Dv CARRIER line. 52*1031c584SApple OSS DistributionsIf the termios structure associated with the terminal file has the 53*1031c584SApple OSS Distributions.Dv CLOCAL 54*1031c584SApple OSS Distributionsflag set in the cflag, or if the 55*1031c584SApple OSS Distributions.Dv O_NONBLOCK 56*1031c584SApple OSS Distributionsflag is set 57*1031c584SApple OSS Distributionsin the 58*1031c584SApple OSS Distributions.Xr open 2 59*1031c584SApple OSS Distributionscall, then the open will succeed even without 60*1031c584SApple OSS Distributionsa connection being present. 61*1031c584SApple OSS DistributionsIn practice, applications 62*1031c584SApple OSS Distributionsseldom open these files; they are opened by special programs, such 63*1031c584SApple OSS Distributionsas 64*1031c584SApple OSS Distributions.Xr getty 2 65*1031c584SApple OSS Distributionsor 66*1031c584SApple OSS Distributions.Xr rlogind 2 , 67*1031c584SApple OSS Distributionsand become 68*1031c584SApple OSS Distributionsan application's standard input, output, and error files. 69*1031c584SApple OSS Distributions.Ss Job Control in a Nutshell 70*1031c584SApple OSS DistributionsEvery process is associated with a particular process group and session. 71*1031c584SApple OSS DistributionsThe grouping is hierarchical: every member of a particular process group is a 72*1031c584SApple OSS Distributionsmember of the same session. This structuring is used in managing groups 73*1031c584SApple OSS Distributionsof related processes for purposes of 74*1031c584SApple OSS Distributions.\" .Gw "job control" ; 75*1031c584SApple OSS Distributions.Em "job control" ; 76*1031c584SApple OSS Distributionsthat is, the 77*1031c584SApple OSS Distributionsability from the keyboard (or from program control) to simultaneously 78*1031c584SApple OSS Distributionsstop or restart 79*1031c584SApple OSS Distributionsa complex command (a command composed of one or more related 80*1031c584SApple OSS Distributionsprocesses). The grouping into process groups allows delivering 81*1031c584SApple OSS Distributionsof signals that stop or start the group as a whole, along with 82*1031c584SApple OSS Distributionsarbitrating which process group has access to the single controlling 83*1031c584SApple OSS Distributionsterminal. The grouping at a higher layer into sessions is to restrict 84*1031c584SApple OSS Distributionsthe job control related signals and system calls to within processes 85*1031c584SApple OSS Distributionsresulting from a particular instance of a "login". Typically, a session 86*1031c584SApple OSS Distributionsis created when a user logs in, and the login terminal is setup 87*1031c584SApple OSS Distributionsto be the controlling terminal; all processes spawned from that 88*1031c584SApple OSS Distributionslogin shell are in the same session, and inherit the controlling 89*1031c584SApple OSS Distributionsterminal. 90*1031c584SApple OSS DistributionsA job control shell 91*1031c584SApple OSS Distributionsoperating interactively (that is, reading commands from a terminal) 92*1031c584SApple OSS Distributionsnormally groups related processes together by placing them into the 93*1031c584SApple OSS Distributionssame process group. A set of processes in the same process group 94*1031c584SApple OSS Distributionsis collectively referred to as a "job". When the foreground process 95*1031c584SApple OSS Distributionsgroup of the terminal is the same as the process group of a particular 96*1031c584SApple OSS Distributionsjob, that job is said to be in the "foreground". When the process 97*1031c584SApple OSS Distributionsgroup of the terminal is different than the process group of 98*1031c584SApple OSS Distributionsa job (but is still the controlling terminal), that job is said 99*1031c584SApple OSS Distributionsto be in the "background". Normally the 100*1031c584SApple OSS Distributionsshell reads a command and starts the job that implements that 101*1031c584SApple OSS Distributionscommand. If the command is to be started in the foreground (typical), it 102*1031c584SApple OSS Distributionssets the process group of the terminal to the process group 103*1031c584SApple OSS Distributionsof the started job, waits for the job to complete, and then 104*1031c584SApple OSS Distributionssets the process group of the terminal back to its own process 105*1031c584SApple OSS Distributionsgroup (it puts itself into the foreground). If the job is to 106*1031c584SApple OSS Distributionsbe started in the background (as denoted by the shell operator "&"), 107*1031c584SApple OSS Distributionsit never changes the process group of the terminal and doesn't 108*1031c584SApple OSS Distributionswait for the job to complete (that is, it immediately attempts to read the next 109*1031c584SApple OSS Distributionscommand). If the job is started in the foreground, the user may 110*1031c584SApple OSS Distributionstype a key (usually 111*1031c584SApple OSS Distributions.Ql \&^Z ) 112*1031c584SApple OSS Distributionswhich generates the terminal stop signal 113*1031c584SApple OSS Distributions.Pq Dv SIGTSTP 114*1031c584SApple OSS Distributionsand has the affect of stopping the entire job. 115*1031c584SApple OSS DistributionsThe shell will notice that the job stopped, and will resume running after 116*1031c584SApple OSS Distributionsplacing itself in the foreground. 117*1031c584SApple OSS DistributionsThe shell also has commands for placing stopped jobs in the background, 118*1031c584SApple OSS Distributionsand for placing stopped or background jobs into the foreground. 119*1031c584SApple OSS Distributions.Ss Orphaned Process Groups 120*1031c584SApple OSS DistributionsAn orphaned process group is a process group that has no process 121*1031c584SApple OSS Distributionswhose parent is in a different process group, yet is in the same 122*1031c584SApple OSS Distributionssession. Conceptually it means a process group that doesn't have 123*1031c584SApple OSS Distributionsa parent that could do anything if it were to be stopped. For example, 124*1031c584SApple OSS Distributionsthe initial login shell is typically in an orphaned process group. 125*1031c584SApple OSS DistributionsOrphaned process groups are immune to keyboard generated stop 126*1031c584SApple OSS Distributionssignals and job control signals resulting from reads or writes to the 127*1031c584SApple OSS Distributionscontrolling terminal. 128*1031c584SApple OSS Distributions.Ss The Controlling Terminal 129*1031c584SApple OSS DistributionsA terminal may belong to a process as its controlling terminal. Each 130*1031c584SApple OSS Distributionsprocess of a session that has a controlling terminal has the same 131*1031c584SApple OSS Distributionscontrolling terminal. A terminal may be the controlling terminal for at 132*1031c584SApple OSS Distributionsmost one session. The controlling terminal for a session is allocated by 133*1031c584SApple OSS Distributionsthe session leader by issuing the 134*1031c584SApple OSS Distributions.Dv TIOCSCTTY 135*1031c584SApple OSS Distributionsioctl. A controlling terminal 136*1031c584SApple OSS Distributionsis never acquired by merely opening a terminal device file. 137*1031c584SApple OSS DistributionsWhen a controlling terminal becomes 138*1031c584SApple OSS Distributionsassociated with a session, its foreground process group is set to 139*1031c584SApple OSS Distributionsthe process group of the session leader. 140*1031c584SApple OSS Distributions.Pp 141*1031c584SApple OSS DistributionsThe controlling terminal is inherited by a child process during a 142*1031c584SApple OSS Distributions.Xr fork 2 143*1031c584SApple OSS Distributionsfunction call. A process relinquishes its controlling terminal when it 144*1031c584SApple OSS Distributionscreates a new session with the 145*1031c584SApple OSS Distributions.Xr setsid 2 146*1031c584SApple OSS Distributionsfunction; other processes 147*1031c584SApple OSS Distributionsremaining in the old session that had this terminal as their controlling 148*1031c584SApple OSS Distributionsterminal continue to have it. 149*1031c584SApple OSS DistributionsA process does not relinquish its 150*1031c584SApple OSS Distributionscontrolling terminal simply by closing all of its file descriptors 151*1031c584SApple OSS Distributionsassociated with the controlling terminal if other processes continue to 152*1031c584SApple OSS Distributionshave it open. 153*1031c584SApple OSS Distributions.Pp 154*1031c584SApple OSS DistributionsWhen a controlling process terminates, the controlling terminal is 155*1031c584SApple OSS Distributionsdisassociated from the current session, allowing it to be acquired by a 156*1031c584SApple OSS Distributionsnew session leader. Subsequent access to the terminal by other processes 157*1031c584SApple OSS Distributionsin the earlier session will be denied, with attempts to access the 158*1031c584SApple OSS Distributionsterminal treated as if modem disconnect had been sensed. 159*1031c584SApple OSS Distributions.Ss Terminal Access Control 160*1031c584SApple OSS DistributionsIf a process is in the foreground process group of its controlling 161*1031c584SApple OSS Distributionsterminal, read operations are allowed. 162*1031c584SApple OSS DistributionsAny attempts by a process 163*1031c584SApple OSS Distributionsin a background process group to read from its controlling terminal 164*1031c584SApple OSS Distributionscauses a 165*1031c584SApple OSS Distributions.Dv SIGTTIN 166*1031c584SApple OSS Distributionssignal to be sent to 167*1031c584SApple OSS Distributionsthe process's group 168*1031c584SApple OSS Distributionsunless one of the 169*1031c584SApple OSS Distributionsfollowing special cases apply: If the reading process is ignoring or 170*1031c584SApple OSS Distributionsblocking the 171*1031c584SApple OSS Distributions.Dv SIGTTIN signal, or if the process group of the reading 172*1031c584SApple OSS Distributionsprocess is orphaned, the 173*1031c584SApple OSS Distributions.Xr read 2 174*1031c584SApple OSS Distributionsreturns -1 with 175*1031c584SApple OSS Distributions.Va errno set to 176*1031c584SApple OSS Distributions.Er EIO 177*1031c584SApple OSS Distributionsand no 178*1031c584SApple OSS Distributionssignal is sent. The default action of the 179*1031c584SApple OSS Distributions.Dv SIGTTIN 180*1031c584SApple OSS Distributionssignal is to stop the 181*1031c584SApple OSS Distributionsprocess to which it is sent. 182*1031c584SApple OSS Distributions.Pp 183*1031c584SApple OSS DistributionsIf a process is in the foreground process group of its controlling 184*1031c584SApple OSS Distributionsterminal, write operations are allowed. 185*1031c584SApple OSS DistributionsAttempts by a process in a background process group to write to its 186*1031c584SApple OSS Distributionscontrolling terminal will cause the process group to be sent a 187*1031c584SApple OSS Distributions.Dv SIGTTOU 188*1031c584SApple OSS Distributionssignal unless one of the following special cases apply: If 189*1031c584SApple OSS Distributions.Dv TOSTOP 190*1031c584SApple OSS Distributionsis not 191*1031c584SApple OSS Distributionsset, or if 192*1031c584SApple OSS Distributions.Dv TOSTOP 193*1031c584SApple OSS Distributionsis set and the process is ignoring or blocking the 194*1031c584SApple OSS Distributions.Dv SIGTTOU 195*1031c584SApple OSS Distributionssignal, the process is allowed to write to the terminal and the 196*1031c584SApple OSS Distributions.Dv SIGTTOU 197*1031c584SApple OSS Distributionssignal is not sent. If 198*1031c584SApple OSS Distributions.Dv TOSTOP 199*1031c584SApple OSS Distributionsis set, and the process group of 200*1031c584SApple OSS Distributionsthe writing process is orphaned, and the writing process is not ignoring 201*1031c584SApple OSS Distributionsor blocking 202*1031c584SApple OSS Distributions.Dv SIGTTOU , 203*1031c584SApple OSS Distributionsthe 204*1031c584SApple OSS Distributions.Xr write 205*1031c584SApple OSS Distributionsreturns -1 with 206*1031c584SApple OSS Distributionserrno set to 207*1031c584SApple OSS Distributions.Er EIO 208*1031c584SApple OSS Distributionsand no signal is sent. 209*1031c584SApple OSS Distributions.Pp 210*1031c584SApple OSS DistributionsCertain calls that set terminal parameters are treated in the same 211*1031c584SApple OSS Distributionsfashion as write, except that 212*1031c584SApple OSS Distributions.Dv TOSTOP 213*1031c584SApple OSS Distributionsis ignored; that is, the effect is 214*1031c584SApple OSS Distributionsidentical to that of terminal writes when 215*1031c584SApple OSS Distributions.Dv TOSTOP 216*1031c584SApple OSS Distributionsis set. 217*1031c584SApple OSS Distributions.Ss Input Processing and Reading Data 218*1031c584SApple OSS DistributionsA terminal device associated with a terminal device file may operate in 219*1031c584SApple OSS Distributionsfull-duplex mode, so that data may arrive even while output is occurring. 220*1031c584SApple OSS DistributionsEach terminal device file has associated with it an input queue, into 221*1031c584SApple OSS Distributionswhich incoming data is stored by the system before being read by a 222*1031c584SApple OSS Distributionsprocess. The system imposes a limit, 223*1031c584SApple OSS Distributions.Pf \&{ Dv MAX_INPUT Ns \&} , 224*1031c584SApple OSS Distributionson the number of 225*1031c584SApple OSS Distributionsbytes that may be stored in the input queue. The behavior of the system 226*1031c584SApple OSS Distributionswhen this limit is exceeded depends on the setting of the 227*1031c584SApple OSS Distributions.Dv IMAXBEL 228*1031c584SApple OSS Distributionsflag in the termios 229*1031c584SApple OSS Distributions.Fa c_iflag . 230*1031c584SApple OSS DistributionsIf this flag is set, the terminal 231*1031c584SApple OSS Distributionsis sent an 232*1031c584SApple OSS Distributions.Tn ASCII 233*1031c584SApple OSS Distributions.Dv BEL 234*1031c584SApple OSS Distributionscharacter each time a character is received 235*1031c584SApple OSS Distributionswhile the input queue is full. Otherwise, the input queue is flushed 236*1031c584SApple OSS Distributionsupon receiving the character. 237*1031c584SApple OSS Distributions.Pp 238*1031c584SApple OSS DistributionsTwo general kinds of input processing are available, determined by 239*1031c584SApple OSS Distributionswhether the terminal device file is in canonical mode or noncanonical 240*1031c584SApple OSS Distributionsmode. Additionally, 241*1031c584SApple OSS Distributionsinput characters are processed according to the 242*1031c584SApple OSS Distributions.Fa c_iflag 243*1031c584SApple OSS Distributionsand 244*1031c584SApple OSS Distributions.Fa c_lflag 245*1031c584SApple OSS Distributionsfields. Such processing can include echoing, which 246*1031c584SApple OSS Distributionsin general means transmitting input characters immediately back to the 247*1031c584SApple OSS Distributionsterminal when they are received from the terminal. This is useful for 248*1031c584SApple OSS Distributionsterminals that can operate in full-duplex mode. 249*1031c584SApple OSS Distributions.Pp 250*1031c584SApple OSS DistributionsThe manner in which data is provided to a process reading from a terminal 251*1031c584SApple OSS Distributionsdevice file is dependent on whether the terminal device file is in 252*1031c584SApple OSS Distributionscanonical or noncanonical mode. 253*1031c584SApple OSS Distributions.Pp 254*1031c584SApple OSS DistributionsAnother dependency is whether the 255*1031c584SApple OSS Distributions.Dv O_NONBLOCK 256*1031c584SApple OSS Distributionsflag is set by 257*1031c584SApple OSS Distributions.Xr open() 258*1031c584SApple OSS Distributionsor 259*1031c584SApple OSS Distributions.Xr fcntl() . 260*1031c584SApple OSS DistributionsIf the 261*1031c584SApple OSS Distributions.Dv O_NONBLOCK 262*1031c584SApple OSS Distributionsflag is clear, then the read request is 263*1031c584SApple OSS Distributionsblocked until data is available or a signal has been received. If the 264*1031c584SApple OSS Distributions.Dv O_NONBLOCK 265*1031c584SApple OSS Distributionsflag is set, then the read request is completed, without 266*1031c584SApple OSS Distributionsblocking, in one of three ways: 267*1031c584SApple OSS Distributions.Bl -enum -offset indent 268*1031c584SApple OSS Distributions.It 269*1031c584SApple OSS DistributionsIf there is enough data available to satisfy the entire request, 270*1031c584SApple OSS Distributionsand the read completes successfully the number of 271*1031c584SApple OSS Distributionsbytes read is returned. 272*1031c584SApple OSS Distributions.It 273*1031c584SApple OSS DistributionsIf there is not enough data available to satisfy the entire 274*1031c584SApple OSS Distributionsrequest, and the read completes successfully, having read as 275*1031c584SApple OSS Distributionsmuch data as possible, the number of bytes read is returned. 276*1031c584SApple OSS Distributions.It 277*1031c584SApple OSS DistributionsIf there is no data available, the read returns -1, with 278*1031c584SApple OSS Distributionserrno set to 279*1031c584SApple OSS Distributions.Er EAGAIN . 280*1031c584SApple OSS Distributions.El 281*1031c584SApple OSS Distributions.Pp 282*1031c584SApple OSS DistributionsWhen data is available depends on whether the input processing mode is 283*1031c584SApple OSS Distributionscanonical or noncanonical. 284*1031c584SApple OSS Distributions.Ss Canonical Mode Input Processing 285*1031c584SApple OSS DistributionsIn canonical mode input processing, terminal input is processed in units 286*1031c584SApple OSS Distributionsof lines. A line is delimited by a newline 287*1031c584SApple OSS Distributions.Ql \&\en 288*1031c584SApple OSS Distributionscharacter, an end-of-file 289*1031c584SApple OSS Distributions.Pq Dv EOF 290*1031c584SApple OSS Distributionscharacter, or an end-of-line 291*1031c584SApple OSS Distributions.Pq Dv EOL 292*1031c584SApple OSS Distributionscharacter. See the 293*1031c584SApple OSS Distributions.Sx "Special Characters" 294*1031c584SApple OSS Distributionssection for 295*1031c584SApple OSS Distributionsmore information on 296*1031c584SApple OSS Distributions.Dv EOF 297*1031c584SApple OSS Distributionsand 298*1031c584SApple OSS Distributions.Dv EOL . 299*1031c584SApple OSS DistributionsThis means that a read request will 300*1031c584SApple OSS Distributionsnot return until an entire line has been typed, or a signal has been 301*1031c584SApple OSS Distributionsreceived. Also, no matter how many bytes are requested in the read call, 302*1031c584SApple OSS Distributionsat most one line is returned. It is not, however, necessary to 303*1031c584SApple OSS Distributionsread a whole line at once; any number of bytes, even one, may be 304*1031c584SApple OSS Distributionsrequested in a read without losing information. 305*1031c584SApple OSS Distributions.Pp 306*1031c584SApple OSS Distributions.Pf \&{ Dv MAX_CANON Ns \&} 307*1031c584SApple OSS Distributionsis a limit on the 308*1031c584SApple OSS Distributionsnumber of bytes in a line. 309*1031c584SApple OSS DistributionsThe behavior of the system when this limit is 310*1031c584SApple OSS Distributionsexceeded is the same as when the input queue limit 311*1031c584SApple OSS Distributions.Pf \&{ Dv MAX_INPUT Ns \&} , 312*1031c584SApple OSS Distributionsis exceeded. 313*1031c584SApple OSS Distributions.Pp 314*1031c584SApple OSS DistributionsErase and kill processing occur when either of two special characters, 315*1031c584SApple OSS Distributionsthe 316*1031c584SApple OSS Distributions.Dv ERASE 317*1031c584SApple OSS Distributionsand 318*1031c584SApple OSS Distributions.Dv KILL 319*1031c584SApple OSS Distributionscharacters (see the 320*1031c584SApple OSS Distributions.Sx "Special Characters section" ) , 321*1031c584SApple OSS Distributionsis received. 322*1031c584SApple OSS DistributionsThis processing affects data in the input queue that has not yet been 323*1031c584SApple OSS Distributionsdelimited by a newline 324*1031c584SApple OSS Distributions.Dv NL, 325*1031c584SApple OSS Distributions.Dv EOF , 326*1031c584SApple OSS Distributionsor 327*1031c584SApple OSS Distributions.Dv EOL 328*1031c584SApple OSS Distributionscharacter. This un-delimited 329*1031c584SApple OSS Distributionsdata makes up the current line. The 330*1031c584SApple OSS Distributions.Dv ERASE 331*1031c584SApple OSS Distributionscharacter deletes the last 332*1031c584SApple OSS Distributionscharacter in the current line, if there is any. The 333*1031c584SApple OSS Distributions.Dv KILL 334*1031c584SApple OSS Distributionscharacter 335*1031c584SApple OSS Distributionsdeletes all data in the current line, if there is any. The 336*1031c584SApple OSS Distributions.Dv ERASE 337*1031c584SApple OSS Distributionsand 338*1031c584SApple OSS Distributions.Dv KILL 339*1031c584SApple OSS Distributionscharacters have no effect if there is no data in the current line. 340*1031c584SApple OSS DistributionsThe 341*1031c584SApple OSS Distributions.Dv ERASE 342*1031c584SApple OSS Distributionsand 343*1031c584SApple OSS Distributions.Dv KILL 344*1031c584SApple OSS Distributionscharacters themselves are not placed in the input 345*1031c584SApple OSS Distributionsqueue. 346*1031c584SApple OSS Distributions.Ss Noncanonical Mode Input Processing 347*1031c584SApple OSS DistributionsIn noncanonical mode input processing, input bytes are not assembled into 348*1031c584SApple OSS Distributionslines, and erase and kill processing does not occur. The values of the 349*1031c584SApple OSS Distributions.Dv MIN 350*1031c584SApple OSS Distributionsand 351*1031c584SApple OSS Distributions.Dv TIME 352*1031c584SApple OSS Distributionsmembers of the 353*1031c584SApple OSS Distributions.Fa c_cc 354*1031c584SApple OSS Distributionsarray are used to determine how to 355*1031c584SApple OSS Distributionsprocess the bytes received. 356*1031c584SApple OSS Distributions.Pp 357*1031c584SApple OSS Distributions.Dv MIN 358*1031c584SApple OSS Distributionsrepresents the minimum number of bytes that should be received when 359*1031c584SApple OSS Distributionsthe 360*1031c584SApple OSS Distributions.Xr read 361*1031c584SApple OSS Distributionsfunction successfully returns. 362*1031c584SApple OSS Distributions.Dv TIME 363*1031c584SApple OSS Distributionsis a timer of 0.1 second 364*1031c584SApple OSS Distributionsgranularity that is used to time out bursty and short term data 365*1031c584SApple OSS Distributionstransmissions. If 366*1031c584SApple OSS Distributions.Dv MIN 367*1031c584SApple OSS Distributionsis greater than 368*1031c584SApple OSS Distributions.Dv \&{ Dv MAX_INPUT Ns \&} , 369*1031c584SApple OSS Distributionsthe response to the 370*1031c584SApple OSS Distributionsrequest is undefined. The four possible values for 371*1031c584SApple OSS Distributions.Dv MIN 372*1031c584SApple OSS Distributionsand 373*1031c584SApple OSS Distributions.Dv TIME 374*1031c584SApple OSS Distributionsand 375*1031c584SApple OSS Distributionstheir interactions are described below. 376*1031c584SApple OSS Distributions.Ss "Case A: MIN > 0, TIME > 0" 377*1031c584SApple OSS DistributionsIn this case 378*1031c584SApple OSS Distributions.Dv TIME 379*1031c584SApple OSS Distributionsserves as an inter-byte timer and is activated after 380*1031c584SApple OSS Distributionsthe first byte is received. Since it is an inter-byte timer, it is reset 381*1031c584SApple OSS Distributionsafter a byte is received. The interaction between 382*1031c584SApple OSS Distributions.Dv MIN 383*1031c584SApple OSS Distributionsand 384*1031c584SApple OSS Distributions.Dv TIME 385*1031c584SApple OSS Distributionsis as 386*1031c584SApple OSS Distributionsfollows: as soon as one byte is received, the inter-byte timer is 387*1031c584SApple OSS Distributionsstarted. If 388*1031c584SApple OSS Distributions.Dv MIN 389*1031c584SApple OSS Distributionsbytes are received before the inter-byte timer expires 390*1031c584SApple OSS Distributions(remember that the timer is reset upon receipt of each byte), the read is 391*1031c584SApple OSS Distributionssatisfied. If the timer expires before 392*1031c584SApple OSS Distributions.Dv MIN 393*1031c584SApple OSS Distributionsbytes are received, the 394*1031c584SApple OSS Distributionscharacters received to that point are returned to the user. Note that if 395*1031c584SApple OSS Distributions.Dv TIME 396*1031c584SApple OSS Distributionsexpires at least one byte is returned because the timer would 397*1031c584SApple OSS Distributionsnot have been enabled unless a byte was received. In this case 398*1031c584SApple OSS Distributions.Pf \&( Dv MIN 399*1031c584SApple OSS Distributions> 0, 400*1031c584SApple OSS Distributions.Dv TIME 401*1031c584SApple OSS Distributions> 0) the read blocks until the 402*1031c584SApple OSS Distributions.Dv MIN 403*1031c584SApple OSS Distributionsand 404*1031c584SApple OSS Distributions.Dv TIME 405*1031c584SApple OSS Distributionsmechanisms are 406*1031c584SApple OSS Distributionsactivated by the receipt of the first byte, or a signal is received. If 407*1031c584SApple OSS Distributionsdata is in the buffer at the time of the read(), the result is as 408*1031c584SApple OSS Distributionsif data had been received immediately after the read(). 409*1031c584SApple OSS Distributions.Ss "Case B: MIN > 0, TIME = 0" 410*1031c584SApple OSS DistributionsIn this case, since the value of 411*1031c584SApple OSS Distributions.Dv TIME 412*1031c584SApple OSS Distributionsis zero, the timer plays no role 413*1031c584SApple OSS Distributionsand only 414*1031c584SApple OSS Distributions.Dv MIN 415*1031c584SApple OSS Distributionsis significant. A pending read is not satisfied until 416*1031c584SApple OSS Distributions.Dv MIN 417*1031c584SApple OSS Distributionsbytes are received (i.e., the pending read blocks until 418*1031c584SApple OSS Distributions.Dv MIN 419*1031c584SApple OSS Distributionsbytes 420*1031c584SApple OSS Distributionsare received), or a signal is received. A program that uses this case to 421*1031c584SApple OSS Distributionsread record-based terminal 422*1031c584SApple OSS Distributions.Dv I/O 423*1031c584SApple OSS Distributionsmay block indefinitely in the read 424*1031c584SApple OSS Distributionsoperation. 425*1031c584SApple OSS Distributions.Ss "Case C: MIN = 0, TIME > 0" 426*1031c584SApple OSS DistributionsIn this case, since 427*1031c584SApple OSS Distributions.Dv MIN 428*1031c584SApple OSS Distributions= 0, 429*1031c584SApple OSS Distributions.Dv TIME 430*1031c584SApple OSS Distributionsno longer represents an inter-byte 431*1031c584SApple OSS Distributionstimer. It now serves as a read timer that is activated as soon as the 432*1031c584SApple OSS Distributionsread function is processed. A read is satisfied as soon as a single 433*1031c584SApple OSS Distributionsbyte is received or the read timer expires. Note that in this case if 434*1031c584SApple OSS Distributionsthe timer expires, no bytes are returned. If the timer does not 435*1031c584SApple OSS Distributionsexpire, the only way the read can be satisfied is if a byte is received. 436*1031c584SApple OSS DistributionsIn this case the read will not block indefinitely waiting for a byte; if 437*1031c584SApple OSS Distributionsno byte is received within 438*1031c584SApple OSS Distributions.Dv TIME Ns *0.1 439*1031c584SApple OSS Distributionsseconds after the read is initiated, 440*1031c584SApple OSS Distributionsthe read returns a value of zero, having read no data. If data is 441*1031c584SApple OSS Distributionsin the buffer at the time of the read, the timer is started as if 442*1031c584SApple OSS Distributionsdata had been received immediately after the read. 443*1031c584SApple OSS Distributions.Ss Case D: MIN = 0, TIME = 0 444*1031c584SApple OSS DistributionsThe minimum of either the number of bytes requested or the number of 445*1031c584SApple OSS Distributionsbytes currently available is returned without waiting for more 446*1031c584SApple OSS Distributionsbytes to be input. If no characters are available, read returns a 447*1031c584SApple OSS Distributionsvalue of zero, having read no data. 448*1031c584SApple OSS Distributions.Ss Writing Data and Output Processing 449*1031c584SApple OSS DistributionsWhen a process writes one or more bytes to a terminal device file, they 450*1031c584SApple OSS Distributionsare processed according to the 451*1031c584SApple OSS Distributions.Fa c_oflag 452*1031c584SApple OSS Distributionsfield (see the 453*1031c584SApple OSS Distributions.Sx "Output Modes 454*1031c584SApple OSS Distributionssection). The 455*1031c584SApple OSS Distributionsimplementation may provide a buffering mechanism; as such, when a call to 456*1031c584SApple OSS Distributionswrite() completes, all of the bytes written have been scheduled for 457*1031c584SApple OSS Distributionstransmission to the device, but the transmission will not necessarily 458*1031c584SApple OSS Distributionshave been completed. 459*1031c584SApple OSS Distributions.\" See also .Sx "6.4.2" for the effects of 460*1031c584SApple OSS Distributions.\" .Dv O_NONBLOCK 461*1031c584SApple OSS Distributions.\" on write. 462*1031c584SApple OSS Distributions.Ss Special Characters 463*1031c584SApple OSS DistributionsCertain characters have special functions on input or output or both. 464*1031c584SApple OSS DistributionsThese functions are summarized as follows: 465*1031c584SApple OSS Distributions.Bl -tag -width indent 466*1031c584SApple OSS Distributions.It Dv INTR 467*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 468*1031c584SApple OSS Distributions.Dv ISIG 469*1031c584SApple OSS Distributionsflag (see the 470*1031c584SApple OSS Distributions.Sx "Local Modes" 471*1031c584SApple OSS Distributionssection) is enabled. Generates a 472*1031c584SApple OSS Distributions.Dv SIGINT 473*1031c584SApple OSS Distributionssignal which is sent to all processes in the foreground 474*1031c584SApple OSS Distributionsprocess group for which the terminal is the controlling 475*1031c584SApple OSS Distributionsterminal. If 476*1031c584SApple OSS Distributions.Dv ISIG 477*1031c584SApple OSS Distributionsis set, the 478*1031c584SApple OSS Distributions.Dv INTR 479*1031c584SApple OSS Distributionscharacter is 480*1031c584SApple OSS Distributionsdiscarded when processed. 481*1031c584SApple OSS Distributions.It Dv QUIT 482*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 483*1031c584SApple OSS Distributions.Dv ISIG 484*1031c584SApple OSS Distributionsflag is enabled. Generates a 485*1031c584SApple OSS Distributions.Dv SIGQUIT 486*1031c584SApple OSS Distributionssignal which is 487*1031c584SApple OSS Distributionssent to all processes in the foreground process group 488*1031c584SApple OSS Distributionsfor which the terminal is the controlling terminal. If 489*1031c584SApple OSS Distributions.Dv ISIG 490*1031c584SApple OSS Distributionsis set, the 491*1031c584SApple OSS Distributions.Dv QUIT 492*1031c584SApple OSS Distributionscharacter is discarded when 493*1031c584SApple OSS Distributionsprocessed. 494*1031c584SApple OSS Distributions.It Dv ERASE 495*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 496*1031c584SApple OSS Distributions.Dv ICANON 497*1031c584SApple OSS Distributionsflag is set. Erases the last character in the 498*1031c584SApple OSS Distributionscurrent line; see 499*1031c584SApple OSS Distributions.Sx "Canonical Mode Input Processing" . 500*1031c584SApple OSS DistributionsIt does not erase beyond 501*1031c584SApple OSS Distributionsthe start of a line, as delimited by an 502*1031c584SApple OSS Distributions.Dv NL , 503*1031c584SApple OSS Distributions.Dv EOF , 504*1031c584SApple OSS Distributionsor 505*1031c584SApple OSS Distributions.Dv EOL 506*1031c584SApple OSS Distributionscharacter. If 507*1031c584SApple OSS Distributions.Dv ICANON 508*1031c584SApple OSS Distributionsis set, the 509*1031c584SApple OSS Distributions.Dv ERASE 510*1031c584SApple OSS Distributionscharacter is 511*1031c584SApple OSS Distributionsdiscarded when processed. 512*1031c584SApple OSS Distributions.It Dv KILL 513*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 514*1031c584SApple OSS Distributions.Dv ICANON 515*1031c584SApple OSS Distributionsflag is set. Deletes the entire line, as 516*1031c584SApple OSS Distributionsdelimited by a 517*1031c584SApple OSS Distributions.Dv NL , 518*1031c584SApple OSS Distributions.Dv EOF , 519*1031c584SApple OSS Distributionsor 520*1031c584SApple OSS Distributions.Dv EOL 521*1031c584SApple OSS Distributionscharacter. If 522*1031c584SApple OSS Distributions.Dv ICANON 523*1031c584SApple OSS Distributionsis set, the 524*1031c584SApple OSS Distributions.Dv KILL 525*1031c584SApple OSS Distributionscharacter is discarded when processed. 526*1031c584SApple OSS Distributions.It Dv EOF 527*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 528*1031c584SApple OSS Distributions.Dv ICANON 529*1031c584SApple OSS Distributionsflag is set. When received, all the bytes 530*1031c584SApple OSS Distributionswaiting to be read are immediately passed to the 531*1031c584SApple OSS Distributionsprocess, without waiting for a newline, and the 532*1031c584SApple OSS Distributions.Dv EOF 533*1031c584SApple OSS Distributionsis discarded. Thus, if there are no bytes waiting (that 534*1031c584SApple OSS Distributionsis, the 535*1031c584SApple OSS Distributions.Dv EOF 536*1031c584SApple OSS Distributionsoccurred at the beginning of a line), a byte 537*1031c584SApple OSS Distributionscount of zero is returned from the read(), 538*1031c584SApple OSS Distributionsrepresenting an end-of-file indication. If 539*1031c584SApple OSS Distributions.Dv ICANON 540*1031c584SApple OSS Distributionsis 541*1031c584SApple OSS Distributionsset, the 542*1031c584SApple OSS Distributions.Dv EOF 543*1031c584SApple OSS Distributionscharacter is discarded when processed. 544*1031c584SApple OSS Distributions.Dv NL 545*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 546*1031c584SApple OSS Distributions.Dv ICANON 547*1031c584SApple OSS Distributionsflag is set. It is the line delimiter 548*1031c584SApple OSS Distributions.Ql \&\en . 549*1031c584SApple OSS Distributions.It Dv EOL 550*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 551*1031c584SApple OSS Distributions.Dv ICANON 552*1031c584SApple OSS Distributionsflag is set. Is an additional line delimiter, 553*1031c584SApple OSS Distributionslike 554*1031c584SApple OSS Distributions.Dv NL . 555*1031c584SApple OSS Distributions.It Dv SUSP 556*1031c584SApple OSS DistributionsIf the 557*1031c584SApple OSS Distributions.Dv ISIG 558*1031c584SApple OSS Distributionsflag is enabled, receipt of the 559*1031c584SApple OSS Distributions.Dv SUSP 560*1031c584SApple OSS Distributionscharacter causes a 561*1031c584SApple OSS Distributions.Dv SIGTSTP 562*1031c584SApple OSS Distributionssignal to be sent to all processes in the 563*1031c584SApple OSS Distributionsforeground process group for which the terminal is the 564*1031c584SApple OSS Distributionscontrolling terminal, and the 565*1031c584SApple OSS Distributions.Dv SUSP 566*1031c584SApple OSS Distributionscharacter is 567*1031c584SApple OSS Distributionsdiscarded when processed. 568*1031c584SApple OSS Distributions.It Dv STOP 569*1031c584SApple OSS DistributionsSpecial character on both input and output and is 570*1031c584SApple OSS Distributionsrecognized if the 571*1031c584SApple OSS Distributions.Dv IXON 572*1031c584SApple OSS Distributions(output control) or 573*1031c584SApple OSS Distributions.Dv IXOFF 574*1031c584SApple OSS Distributions(input 575*1031c584SApple OSS Distributionscontrol) flag is set. Can be used to temporarily 576*1031c584SApple OSS Distributionssuspend output. It is useful with fast terminals to 577*1031c584SApple OSS Distributionsprevent output from disappearing before it can be read. 578*1031c584SApple OSS DistributionsIf 579*1031c584SApple OSS Distributions.Dv IXON 580*1031c584SApple OSS Distributionsis set, the 581*1031c584SApple OSS Distributions.Dv STOP 582*1031c584SApple OSS Distributionscharacter is discarded when 583*1031c584SApple OSS Distributionsprocessed. 584*1031c584SApple OSS Distributions.It Dv START 585*1031c584SApple OSS DistributionsSpecial character on both input and output and is 586*1031c584SApple OSS Distributionsrecognized if the 587*1031c584SApple OSS Distributions.Dv IXON 588*1031c584SApple OSS Distributions(output control) or 589*1031c584SApple OSS Distributions.Dv IXOFF 590*1031c584SApple OSS Distributions(input 591*1031c584SApple OSS Distributionscontrol) flag is set. Can be used to resume output that 592*1031c584SApple OSS Distributionshas been suspended by a 593*1031c584SApple OSS Distributions.Dv STOP 594*1031c584SApple OSS Distributionscharacter. If 595*1031c584SApple OSS Distributions.Dv IXON 596*1031c584SApple OSS Distributionsis set, the 597*1031c584SApple OSS Distributions.Dv START 598*1031c584SApple OSS Distributionscharacter is discarded when processed. 599*1031c584SApple OSS Distributions.Dv CR 600*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 601*1031c584SApple OSS Distributions.Dv ICANON 602*1031c584SApple OSS Distributionsflag is set; it is the 603*1031c584SApple OSS Distributions.Ql \&\er , 604*1031c584SApple OSS Distributionsas denoted in the 605*1031c584SApple OSS Distributions.Tn \&C 606*1031c584SApple OSS DistributionsStandard {2}. When 607*1031c584SApple OSS Distributions.Dv ICANON 608*1031c584SApple OSS Distributionsand 609*1031c584SApple OSS Distributions.Dv ICRNL 610*1031c584SApple OSS Distributionsare set and 611*1031c584SApple OSS Distributions.Dv IGNCR 612*1031c584SApple OSS Distributionsis not set, this character is translated into a 613*1031c584SApple OSS Distributions.Dv NL , 614*1031c584SApple OSS Distributionsand 615*1031c584SApple OSS Distributionshas the same effect as a 616*1031c584SApple OSS Distributions.Dv NL 617*1031c584SApple OSS Distributionscharacter. 618*1031c584SApple OSS Distributions.El 619*1031c584SApple OSS Distributions.Pp 620*1031c584SApple OSS DistributionsThe following special characters are extensions defined by this 621*1031c584SApple OSS Distributionssystem and are not a part of 1003.1 termios. 622*1031c584SApple OSS Distributions.Bl -tag -width indent 623*1031c584SApple OSS Distributions.It Dv EOL2 624*1031c584SApple OSS DistributionsSecondary 625*1031c584SApple OSS Distributions.Dv EOL 626*1031c584SApple OSS Distributionscharacter. Same function as 627*1031c584SApple OSS Distributions.Dv EOL. 628*1031c584SApple OSS Distributions.It Dv WERASE 629*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 630*1031c584SApple OSS Distributions.Dv ICANON 631*1031c584SApple OSS Distributionsflag is set. Erases the last word in the current 632*1031c584SApple OSS Distributionsline according to one of two algorithms. If the 633*1031c584SApple OSS Distributions.Dv ALTWERASE 634*1031c584SApple OSS Distributionsflag is not set, first any preceding whitespace is 635*1031c584SApple OSS Distributionserased, and then the maximal sequence of non-whitespace 636*1031c584SApple OSS Distributionscharacters. If 637*1031c584SApple OSS Distributions.Dv ALTWERASE 638*1031c584SApple OSS Distributionsis set, first any preceding 639*1031c584SApple OSS Distributionswhitespace is erased, and then the maximal sequence 640*1031c584SApple OSS Distributionsof alphabetic/underscores or non alphabetic/underscores. 641*1031c584SApple OSS DistributionsAs a special case in this second algorithm, the first previous 642*1031c584SApple OSS Distributionsnon-whitespace character is skipped in determining 643*1031c584SApple OSS Distributionswhether the preceding word is a sequence of 644*1031c584SApple OSS Distributionsalphabetic/undercores. This sounds confusing but turns 645*1031c584SApple OSS Distributionsout to be quite practical. 646*1031c584SApple OSS Distributions.It Dv REPRINT 647*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 648*1031c584SApple OSS Distributions.Dv ICANON 649*1031c584SApple OSS Distributionsflag is set. Causes the current input edit line 650*1031c584SApple OSS Distributionsto be retyped. 651*1031c584SApple OSS Distributions.It Dv DSUSP 652*1031c584SApple OSS DistributionsHas similar actions to the 653*1031c584SApple OSS Distributions.Dv SUSP 654*1031c584SApple OSS Distributionscharacter, except that 655*1031c584SApple OSS Distributionsthe 656*1031c584SApple OSS Distributions.Dv SIGTSTP 657*1031c584SApple OSS Distributionssignal is delivered when one of the processes 658*1031c584SApple OSS Distributionsin the foreground process group issues a read() to the 659*1031c584SApple OSS Distributionscontrolling terminal. 660*1031c584SApple OSS Distributions.It Dv LNEXT 661*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 662*1031c584SApple OSS Distributions.Dv IEXTEN 663*1031c584SApple OSS Distributionsflag is set. Receipt of this character causes the next 664*1031c584SApple OSS Distributionscharacter to be taken literally. 665*1031c584SApple OSS Distributions.It Dv DISCARD 666*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 667*1031c584SApple OSS Distributions.Dv IEXTEN 668*1031c584SApple OSS Distributionsflag is set. Receipt of this character toggles the flushing 669*1031c584SApple OSS Distributionsof terminal output. 670*1031c584SApple OSS Distributions.It Dv STATUS 671*1031c584SApple OSS DistributionsSpecial character on input and is recognized if the 672*1031c584SApple OSS Distributions.Dv ICANON 673*1031c584SApple OSS Distributionsflag is set. Receipt of this character causes a 674*1031c584SApple OSS Distributions.Dv SIGINFO 675*1031c584SApple OSS Distributionssignal to be sent to the foreground process group of the 676*1031c584SApple OSS Distributionsterminal. Also, if the 677*1031c584SApple OSS Distributions.Dv NOKERNINFO 678*1031c584SApple OSS Distributionsflag is not set, it 679*1031c584SApple OSS Distributionscauses the kernel to write a status message to the terminal 680*1031c584SApple OSS Distributionsthat displays the current load average, the name of the 681*1031c584SApple OSS Distributionscommand in the foreground, its process ID, the symbolic 682*1031c584SApple OSS Distributionswait channel, the number of user and system seconds used, 683*1031c584SApple OSS Distributionsthe percentage of cpu the process is getting, and the resident 684*1031c584SApple OSS Distributionsset size of the process. 685*1031c584SApple OSS Distributions.El 686*1031c584SApple OSS Distributions.Pp 687*1031c584SApple OSS DistributionsThe 688*1031c584SApple OSS Distributions.Dv NL 689*1031c584SApple OSS Distributionsand 690*1031c584SApple OSS Distributions.Dv CR 691*1031c584SApple OSS Distributionscharacters cannot be changed. 692*1031c584SApple OSS DistributionsThe values for all the remaining characters can be set and are 693*1031c584SApple OSS Distributionsdescribed later in the document under 694*1031c584SApple OSS DistributionsSpecial Control Characters. 695*1031c584SApple OSS Distributions.Pp 696*1031c584SApple OSS DistributionsSpecial 697*1031c584SApple OSS Distributionscharacter functions associated with changeable special control characters 698*1031c584SApple OSS Distributionscan be disabled individually by setting their value to 699*1031c584SApple OSS Distributions.Dv {_POSIX_VDISABLE}; 700*1031c584SApple OSS Distributionssee 701*1031c584SApple OSS Distributions.Sx "Special Control Characters" . 702*1031c584SApple OSS Distributions.Pp 703*1031c584SApple OSS DistributionsIf two or more special characters have the same value, the function 704*1031c584SApple OSS Distributionsperformed when that character is received is undefined. 705*1031c584SApple OSS Distributions.Ss Modem Disconnect 706*1031c584SApple OSS DistributionsIf a modem disconnect is detected by the terminal interface for a 707*1031c584SApple OSS Distributionscontrolling terminal, and if 708*1031c584SApple OSS Distributions.Dv CLOCAL 709*1031c584SApple OSS Distributionsis not set in the 710*1031c584SApple OSS Distributions.Fa c_cflag 711*1031c584SApple OSS Distributionsfield for 712*1031c584SApple OSS Distributionsthe terminal, the 713*1031c584SApple OSS Distributions.Dv SIGHUP 714*1031c584SApple OSS Distributionssignal is sent to the controlling 715*1031c584SApple OSS Distributionsprocess associated with the terminal. Unless other arrangements have 716*1031c584SApple OSS Distributionsbeen made, this causes the controlling process to terminate. 717*1031c584SApple OSS DistributionsAny subsequent call to the read() function returns the value zero, 718*1031c584SApple OSS Distributionsindicating end of file. Thus, processes that read a terminal 719*1031c584SApple OSS Distributionsfile and test for end-of-file can terminate appropriately after a 720*1031c584SApple OSS Distributionsdisconnect. 721*1031c584SApple OSS Distributions.\" If the 722*1031c584SApple OSS Distributions.\" .Er EIO 723*1031c584SApple OSS Distributions.\" condition specified in 6.1.1.4 that applies 724*1031c584SApple OSS Distributions.\" when the implementation supports job control also exists, it is 725*1031c584SApple OSS Distributions.\" unspecified whether the 726*1031c584SApple OSS Distributions.\" .Dv EOF 727*1031c584SApple OSS Distributions.\" condition or the 728*1031c584SApple OSS Distributions.\" .Pf [ Dv EIO 729*1031c584SApple OSS Distributions.\" ] is returned. 730*1031c584SApple OSS DistributionsAny 731*1031c584SApple OSS Distributionssubsequent write() to the terminal device returns -1, with 732*1031c584SApple OSS Distributions.Va errno 733*1031c584SApple OSS Distributionsset to 734*1031c584SApple OSS Distributions.Er EIO , 735*1031c584SApple OSS Distributionsuntil the device is closed. 736*1031c584SApple OSS Distributions.Sh General Terminal Interface 737*1031c584SApple OSS Distributions.Pp 738*1031c584SApple OSS Distributions.Ss Closing a Terminal Device File 739*1031c584SApple OSS DistributionsThe last process to close a terminal device file causes any output 740*1031c584SApple OSS Distributionsto be sent to the device and any input to be discarded. Then, if 741*1031c584SApple OSS Distributions.Dv HUPCL 742*1031c584SApple OSS Distributionsis set in the control modes, and the communications port supports a 743*1031c584SApple OSS Distributionsdisconnect function, the terminal device performs a disconnect. 744*1031c584SApple OSS Distributions.Ss Parameters That Can Be Set 745*1031c584SApple OSS DistributionsRoutines that need to control certain terminal 746*1031c584SApple OSS Distributions.Tn I/O 747*1031c584SApple OSS Distributionscharacteristics 748*1031c584SApple OSS Distributionsdo so by using the termios structure as defined in the header 749*1031c584SApple OSS Distributions.Aq Pa termios.h . 750*1031c584SApple OSS DistributionsThis structure contains minimally four scalar elements of bit flags 751*1031c584SApple OSS Distributionsand one array of special characters. The scalar flag elements are 752*1031c584SApple OSS Distributionsnamed: 753*1031c584SApple OSS Distributions.Fa c_iflag , 754*1031c584SApple OSS Distributions.Fa c_oflag , 755*1031c584SApple OSS Distributions.Fa c_cflag , 756*1031c584SApple OSS Distributionsand 757*1031c584SApple OSS Distributions.Fa c_lflag . 758*1031c584SApple OSS DistributionsThe character array is named 759*1031c584SApple OSS Distributions.Fa c_cc , 760*1031c584SApple OSS Distributionsand its maximum index is 761*1031c584SApple OSS Distributions.Dv NCCS . 762*1031c584SApple OSS Distributions.Ss Input Modes 763*1031c584SApple OSS DistributionsValues of the 764*1031c584SApple OSS Distributions.Fa c_iflag 765*1031c584SApple OSS Distributionsfield describe the basic 766*1031c584SApple OSS Distributionsterminal input control, and are composed of 767*1031c584SApple OSS Distributionsfollowing masks: 768*1031c584SApple OSS Distributions.Pp 769*1031c584SApple OSS Distributions.Bl -tag -width IMAXBEL -offset indent -compact 770*1031c584SApple OSS Distributions.It Dv IGNBRK 771*1031c584SApple OSS Distributions/* ignore BREAK condition */ 772*1031c584SApple OSS Distributions.It Dv BRKINT 773*1031c584SApple OSS Distributions/* map BREAK to SIGINTR */ 774*1031c584SApple OSS Distributions.It Dv IGNPAR 775*1031c584SApple OSS Distributions/* ignore (discard) parity errors */ 776*1031c584SApple OSS Distributions.It Dv PARMRK 777*1031c584SApple OSS Distributions/* mark parity and framing errors */ 778*1031c584SApple OSS Distributions.It Dv INPCK 779*1031c584SApple OSS Distributions/* enable checking of parity errors */ 780*1031c584SApple OSS Distributions.It Dv ISTRIP 781*1031c584SApple OSS Distributions/* strip 8th bit off chars */ 782*1031c584SApple OSS Distributions.It Dv INLCR 783*1031c584SApple OSS Distributions/* map NL into CR */ 784*1031c584SApple OSS Distributions.It Dv IGNCR 785*1031c584SApple OSS Distributions/* ignore CR */ 786*1031c584SApple OSS Distributions.It Dv ICRNL 787*1031c584SApple OSS Distributions/* map CR to NL (ala CRMOD) */ 788*1031c584SApple OSS Distributions.It Dv IXON 789*1031c584SApple OSS Distributions/* enable output flow control */ 790*1031c584SApple OSS Distributions.It Dv IXOFF 791*1031c584SApple OSS Distributions/* enable input flow control */ 792*1031c584SApple OSS Distributions.It Dv IXANY 793*1031c584SApple OSS Distributions/* any char will restart after stop */ 794*1031c584SApple OSS Distributions.It Dv IMAXBEL 795*1031c584SApple OSS Distributions/* ring bell on input queue full */ 796*1031c584SApple OSS Distributions.It Dv IUCLC 797*1031c584SApple OSS Distributions/* translate upper case to lower case */ 798*1031c584SApple OSS Distributions.El 799*1031c584SApple OSS Distributions.Pp 800*1031c584SApple OSS DistributionsIn the context of asynchronous serial data transmission, a break 801*1031c584SApple OSS Distributionscondition is defined as a sequence of zero-valued bits that continues for 802*1031c584SApple OSS Distributionsmore than the time to send one byte. The entire sequence of zero-valued 803*1031c584SApple OSS Distributionsbits is interpreted as a single break condition, even if it continues for 804*1031c584SApple OSS Distributionsa time equivalent to more than one byte. In contexts other than 805*1031c584SApple OSS Distributionsasynchronous serial data transmission the definition of a break condition 806*1031c584SApple OSS Distributionsis implementation defined. 807*1031c584SApple OSS Distributions.Pp 808*1031c584SApple OSS DistributionsIf 809*1031c584SApple OSS Distributions.Dv IGNBRK 810*1031c584SApple OSS Distributionsis set, a break condition detected on input is ignored, that 811*1031c584SApple OSS Distributionsis, not put on the input queue and therefore not read by any process. If 812*1031c584SApple OSS Distributions.Dv IGNBRK 813*1031c584SApple OSS Distributionsis not set and 814*1031c584SApple OSS Distributions.Dv BRKINT 815*1031c584SApple OSS Distributionsis set, the break condition flushes the 816*1031c584SApple OSS Distributionsinput and output queues and if the terminal is the controlling terminal 817*1031c584SApple OSS Distributionsof a foreground process group, the break condition generates a 818*1031c584SApple OSS Distributionssingle 819*1031c584SApple OSS Distributions.Dv SIGINT 820*1031c584SApple OSS Distributionssignal to that foreground process group. If neither 821*1031c584SApple OSS Distributions.Dv IGNBRK 822*1031c584SApple OSS Distributionsnor 823*1031c584SApple OSS Distributions.Dv BRKINT 824*1031c584SApple OSS Distributionsis set, a break condition is read as a single 825*1031c584SApple OSS Distributions.Ql \&\e0 , 826*1031c584SApple OSS Distributionsor if 827*1031c584SApple OSS Distributions.Dv PARMRK 828*1031c584SApple OSS Distributionsis set, as 829*1031c584SApple OSS Distributions.Ql \&\e377 , 830*1031c584SApple OSS Distributions.Ql \&\e0 , 831*1031c584SApple OSS Distributions.Ql \&\e0 . 832*1031c584SApple OSS Distributions.Pp 833*1031c584SApple OSS DistributionsIf 834*1031c584SApple OSS Distributions.Dv IGNPAR 835*1031c584SApple OSS Distributionsis set, a byte with a framing or parity error (other than 836*1031c584SApple OSS Distributionsbreak) is ignored. 837*1031c584SApple OSS Distributions.Pp 838*1031c584SApple OSS DistributionsIf 839*1031c584SApple OSS Distributions.Dv PARMRK 840*1031c584SApple OSS Distributionsis set, and 841*1031c584SApple OSS Distributions.Dv IGNPAR 842*1031c584SApple OSS Distributionsis not set, a byte with a framing or parity 843*1031c584SApple OSS Distributionserror (other than break) is given to the application as the 844*1031c584SApple OSS Distributionsthree-character sequence 845*1031c584SApple OSS Distributions.Ql \&\e377 , 846*1031c584SApple OSS Distributions.Ql \&\e0 , 847*1031c584SApple OSS DistributionsX, where 848*1031c584SApple OSS Distributions.Ql \&\e377 , 849*1031c584SApple OSS Distributions.Ql \&\e0 850*1031c584SApple OSS Distributionsis a two-character 851*1031c584SApple OSS Distributionsflag preceding each sequence and X is the data of the character received 852*1031c584SApple OSS Distributionsin error. To avoid ambiguity in this case, if 853*1031c584SApple OSS Distributions.Dv ISTRIP 854*1031c584SApple OSS Distributionsis not set, a valid 855*1031c584SApple OSS Distributionscharacter of 856*1031c584SApple OSS Distributions.Ql \&\e377 857*1031c584SApple OSS Distributionsis given to the application as 858*1031c584SApple OSS Distributions.Ql \&\e377 , 859*1031c584SApple OSS Distributions.Ql \&\e377 . 860*1031c584SApple OSS DistributionsIf 861*1031c584SApple OSS Distributionsneither 862*1031c584SApple OSS Distributions.Dv PARMRK 863*1031c584SApple OSS Distributionsnor 864*1031c584SApple OSS Distributions.Dv IGNPAR 865*1031c584SApple OSS Distributionsis set, a framing or parity error (other than 866*1031c584SApple OSS Distributionsbreak) is given to the application as a single character 867*1031c584SApple OSS Distributions.Ql \&\e0 . 868*1031c584SApple OSS Distributions.Pp 869*1031c584SApple OSS DistributionsIf 870*1031c584SApple OSS Distributions.Dv INPCK 871*1031c584SApple OSS Distributionsis set, input parity checking is enabled. If 872*1031c584SApple OSS Distributions.Dv INPCK 873*1031c584SApple OSS Distributionsis not set, 874*1031c584SApple OSS Distributionsinput parity checking is disabled, allowing output parity generation 875*1031c584SApple OSS Distributionswithout input parity errors. Note that whether input parity checking is 876*1031c584SApple OSS Distributionsenabled or disabled is independent of whether parity detection is enabled 877*1031c584SApple OSS Distributionsor disabled (see 878*1031c584SApple OSS Distributions.Sx "Control Modes" ) . 879*1031c584SApple OSS DistributionsIf parity detection is enabled but input 880*1031c584SApple OSS Distributionsparity checking is disabled, the hardware to which the terminal is 881*1031c584SApple OSS Distributionsconnected recognizes the parity bit, but the terminal special file 882*1031c584SApple OSS Distributionsdoes not check whether this bit is set correctly or not. 883*1031c584SApple OSS Distributions.Pp 884*1031c584SApple OSS DistributionsIf 885*1031c584SApple OSS Distributions.Dv ISTRIP 886*1031c584SApple OSS Distributionsis set, valid input bytes are first stripped to seven bits, 887*1031c584SApple OSS Distributionsotherwise all eight bits are processed. 888*1031c584SApple OSS Distributions.Pp 889*1031c584SApple OSS DistributionsIf 890*1031c584SApple OSS Distributions.Dv INLCR 891*1031c584SApple OSS Distributionsis set, a received 892*1031c584SApple OSS Distributions.Dv NL 893*1031c584SApple OSS Distributionscharacter is translated into a 894*1031c584SApple OSS Distributions.Dv CR 895*1031c584SApple OSS Distributionscharacter. If 896*1031c584SApple OSS Distributions.Dv IGNCR 897*1031c584SApple OSS Distributionsis set, a received 898*1031c584SApple OSS Distributions.Dv CR 899*1031c584SApple OSS Distributionscharacter is ignored (not 900*1031c584SApple OSS Distributionsread). If 901*1031c584SApple OSS Distributions.Dv IGNCR 902*1031c584SApple OSS Distributionsis not set and 903*1031c584SApple OSS Distributions.Dv ICRNL 904*1031c584SApple OSS Distributionsis set, a received 905*1031c584SApple OSS Distributions.Dv CR 906*1031c584SApple OSS Distributionscharacter is 907*1031c584SApple OSS Distributionstranslated into a 908*1031c584SApple OSS Distributions.Dv NL 909*1031c584SApple OSS Distributionscharacter. 910*1031c584SApple OSS Distributions.Pp 911*1031c584SApple OSS DistributionsIf 912*1031c584SApple OSS Distributions.Dv IXON 913*1031c584SApple OSS Distributionsis set, start/stop output control is enabled. A received 914*1031c584SApple OSS Distributions.Dv STOP 915*1031c584SApple OSS Distributionscharacter suspends output and a received 916*1031c584SApple OSS Distributions.Dv START 917*1031c584SApple OSS Distributionscharacter 918*1031c584SApple OSS Distributionsrestarts output. If 919*1031c584SApple OSS Distributions.Dv IXANY 920*1031c584SApple OSS Distributionsis also set, then any character may 921*1031c584SApple OSS Distributionsrestart output. When 922*1031c584SApple OSS Distributions.Dv IXON 923*1031c584SApple OSS Distributionsis set, 924*1031c584SApple OSS Distributions.Dv START 925*1031c584SApple OSS Distributionsand 926*1031c584SApple OSS Distributions.Dv STOP 927*1031c584SApple OSS Distributionscharacters are not 928*1031c584SApple OSS Distributionsread, but merely perform flow control functions. When 929*1031c584SApple OSS Distributions.Dv IXON 930*1031c584SApple OSS Distributionsis not set, 931*1031c584SApple OSS Distributionsthe 932*1031c584SApple OSS Distributions.Dv START 933*1031c584SApple OSS Distributionsand 934*1031c584SApple OSS Distributions.Dv STOP 935*1031c584SApple OSS Distributionscharacters are read. 936*1031c584SApple OSS Distributions.Pp 937*1031c584SApple OSS DistributionsIf 938*1031c584SApple OSS Distributions.Dv IXOFF 939*1031c584SApple OSS Distributionsis set, start/stop input control is enabled. The system shall 940*1031c584SApple OSS Distributionstransmit one or more 941*1031c584SApple OSS Distributions.Dv STOP 942*1031c584SApple OSS Distributionscharacters, which are intended to cause the 943*1031c584SApple OSS Distributionsterminal device to stop transmitting data, as needed to prevent the input 944*1031c584SApple OSS Distributionsqueue from overflowing and causing the undefined behavior described in 945*1031c584SApple OSS Distributions.Sx "Input Processing and Reading Data" , 946*1031c584SApple OSS Distributionsand shall transmit one or more 947*1031c584SApple OSS Distributions.Dv START 948*1031c584SApple OSS Distributionscharacters, which are 949*1031c584SApple OSS Distributionsintended to cause the terminal device to resume transmitting data, as 950*1031c584SApple OSS Distributionssoon as the device can continue transmitting data without risk of 951*1031c584SApple OSS Distributionsoverflowing the input queue. The precise conditions under which 952*1031c584SApple OSS Distributions.Dv STOP 953*1031c584SApple OSS Distributionsand 954*1031c584SApple OSS DistributionsSTART 955*1031c584SApple OSS Distributionscharacters are transmitted are implementation defined. 956*1031c584SApple OSS Distributions.Pp 957*1031c584SApple OSS DistributionsIf 958*1031c584SApple OSS Distributions.Dv IMAXBEL 959*1031c584SApple OSS Distributionsis set and the input queue is full, subsequent input shall cause an 960*1031c584SApple OSS Distributions.Tn ASCII 961*1031c584SApple OSS Distributions.Dv BEL 962*1031c584SApple OSS Distributionscharacter to be transmitted to 963*1031c584SApple OSS Distributionsthe output queue. 964*1031c584SApple OSS Distributions.Pp 965*1031c584SApple OSS DistributionsIf 966*1031c584SApple OSS Distributions.Dv IUCLC 967*1031c584SApple OSS Distributionsis set, characters will be translated from upper to lower case on 968*1031c584SApple OSS Distributionsinput. 969*1031c584SApple OSS Distributions.Pp 970*1031c584SApple OSS DistributionsThe initial input control value after open() is implementation defined. 971*1031c584SApple OSS Distributions.Ss Output Modes 972*1031c584SApple OSS DistributionsValues of the 973*1031c584SApple OSS Distributions.Fa c_oflag 974*1031c584SApple OSS Distributionsfield describe the basic terminal output control, 975*1031c584SApple OSS Distributionsand are composed of the following masks: 976*1031c584SApple OSS Distributions.Pp 977*1031c584SApple OSS Distributions.Bl -tag -width OXTABS -offset indent -compact 978*1031c584SApple OSS Distributions.It Dv OPOST 979*1031c584SApple OSS Distributions/* enable following output processing */ 980*1031c584SApple OSS Distributions.It Dv ONLCR 981*1031c584SApple OSS Distributions/* map NL to CR-NL (ala 982*1031c584SApple OSS Distributions.Dv CRMOD) 983*1031c584SApple OSS Distributions*/ 984*1031c584SApple OSS Distributions.It Dv OXTABS 985*1031c584SApple OSS Distributions/* expand tabs to spaces */ 986*1031c584SApple OSS Distributions.It Dv ONOEOT 987*1031c584SApple OSS Distributions/* discard 988*1031c584SApple OSS Distributions.Dv EOT Ns 's 989*1031c584SApple OSS Distributions.Ql \&^D 990*1031c584SApple OSS Distributionson output) */ 991*1031c584SApple OSS Distributions.It Dv OCRNL 992*1031c584SApple OSS Distributions/* map CR to NL */ 993*1031c584SApple OSS Distributions.It Dv OLCUC 994*1031c584SApple OSS Distributions/* translate lower case to upper case */ 995*1031c584SApple OSS Distributions.It Dv ONOCR 996*1031c584SApple OSS Distributions/* No CR output at column 0 */ 997*1031c584SApple OSS Distributions.It Dv ONLRET 998*1031c584SApple OSS Distributions/* NL performs CR function */ 999*1031c584SApple OSS Distributions.El 1000*1031c584SApple OSS Distributions.Pp 1001*1031c584SApple OSS DistributionsIf 1002*1031c584SApple OSS Distributions.Dv OPOST 1003*1031c584SApple OSS Distributionsis set, the remaining flag masks are interpreted as follows; 1004*1031c584SApple OSS Distributionsotherwise characters are transmitted without change. 1005*1031c584SApple OSS Distributions.Pp 1006*1031c584SApple OSS DistributionsIf 1007*1031c584SApple OSS Distributions.Dv ONLCR 1008*1031c584SApple OSS Distributionsis set, newlines are translated to carriage return, linefeeds. 1009*1031c584SApple OSS Distributions.Pp 1010*1031c584SApple OSS DistributionsIf 1011*1031c584SApple OSS Distributions.Dv OXTABS 1012*1031c584SApple OSS Distributionsis set, tabs are expanded to the appropriate number of 1013*1031c584SApple OSS Distributionsspaces (assuming 8 column tab stops). 1014*1031c584SApple OSS Distributions.Pp 1015*1031c584SApple OSS DistributionsIf 1016*1031c584SApple OSS Distributions.Dv ONOEOT 1017*1031c584SApple OSS Distributionsis set, 1018*1031c584SApple OSS Distributions.Tn ASCII 1019*1031c584SApple OSS Distributions.Dv EOT NS 's 1020*1031c584SApple OSS Distributionsare discarded on output. 1021*1031c584SApple OSS Distributions.Pp 1022*1031c584SApple OSS DistributionsIf 1023*1031c584SApple OSS Distributions.Dv OCRNL 1024*1031c584SApple OSS Distributionsis set, carriage returns are translated to newlines. 1025*1031c584SApple OSS Distributions.Pp 1026*1031c584SApple OSS DistributionsIf 1027*1031c584SApple OSS Distributions.Dv OLCUC 1028*1031c584SApple OSS Distributionsis set, lower case is translated to upper case on output. 1029*1031c584SApple OSS Distributions.Pp 1030*1031c584SApple OSS DistributionsIf 1031*1031c584SApple OSS Distributions.Dv ONOCR 1032*1031c584SApple OSS Distributionsis set, no CR character is output when at column 0. 1033*1031c584SApple OSS Distributions.Pp 1034*1031c584SApple OSS DistributionsIf 1035*1031c584SApple OSS Distributions.Dv ONLRET 1036*1031c584SApple OSS Distributionsis set, NL also performs CR on output, and reset current 1037*1031c584SApple OSS Distributionscolumn to 0. 1038*1031c584SApple OSS Distributions.Ss Control Modes 1039*1031c584SApple OSS DistributionsValues of the 1040*1031c584SApple OSS Distributions.Fa c_cflag 1041*1031c584SApple OSS Distributionsfield describe the basic 1042*1031c584SApple OSS Distributionsterminal hardware control, and are composed of the 1043*1031c584SApple OSS Distributionsfollowing masks. 1044*1031c584SApple OSS DistributionsNot all values 1045*1031c584SApple OSS Distributionsspecified are supported by all hardware. 1046*1031c584SApple OSS Distributions.Pp 1047*1031c584SApple OSS Distributions.Bl -tag -width CRTSXIFLOW -offset indent -compact 1048*1031c584SApple OSS Distributions.It Dv CSIZE 1049*1031c584SApple OSS Distributions/* character size mask */ 1050*1031c584SApple OSS Distributions.It Dv CS5 1051*1031c584SApple OSS Distributions/* 5 bits (pseudo) */ 1052*1031c584SApple OSS Distributions.It Dv CS6 1053*1031c584SApple OSS Distributions/* 6 bits */ 1054*1031c584SApple OSS Distributions.It Dv CS7 1055*1031c584SApple OSS Distributions/* 7 bits */ 1056*1031c584SApple OSS Distributions.It Dv CS8 1057*1031c584SApple OSS Distributions/* 8 bits */ 1058*1031c584SApple OSS Distributions.It Dv CSTOPB 1059*1031c584SApple OSS Distributions/* send 2 stop bits */ 1060*1031c584SApple OSS Distributions.It Dv CREAD 1061*1031c584SApple OSS Distributions/* enable receiver */ 1062*1031c584SApple OSS Distributions.It Dv PARENB 1063*1031c584SApple OSS Distributions/* parity enable */ 1064*1031c584SApple OSS Distributions.It Dv PARODD 1065*1031c584SApple OSS Distributions/* odd parity, else even */ 1066*1031c584SApple OSS Distributions.It Dv HUPCL 1067*1031c584SApple OSS Distributions/* hang up on last close */ 1068*1031c584SApple OSS Distributions.It Dv CLOCAL 1069*1031c584SApple OSS Distributions/* ignore modem status lines */ 1070*1031c584SApple OSS Distributions.It Dv CCTS_OFLOW 1071*1031c584SApple OSS Distributions/* 1072*1031c584SApple OSS Distributions.Dv CTS 1073*1031c584SApple OSS Distributionsflow control of output */ 1074*1031c584SApple OSS Distributions.It Dv CRTSCTS 1075*1031c584SApple OSS Distributions/* same as 1076*1031c584SApple OSS Distributions.Dv CCTS_OFLOW 1077*1031c584SApple OSS Distributions*/ 1078*1031c584SApple OSS Distributions.It Dv CRTS_IFLOW 1079*1031c584SApple OSS Distributions/* RTS flow control of input */ 1080*1031c584SApple OSS Distributions.It Dv MDMBUF 1081*1031c584SApple OSS Distributions/* flow control output via Carrier */ 1082*1031c584SApple OSS Distributions.El 1083*1031c584SApple OSS Distributions.Pp 1084*1031c584SApple OSS DistributionsThe 1085*1031c584SApple OSS Distributions.Dv CSIZE 1086*1031c584SApple OSS Distributionsbits specify the byte size in bits for both transmission and 1087*1031c584SApple OSS Distributionsreception. The 1088*1031c584SApple OSS Distributions.Fa c_cflag 1089*1031c584SApple OSS Distributionsis masked with 1090*1031c584SApple OSS Distributions.Dv CSIZE 1091*1031c584SApple OSS Distributionsand compared with the 1092*1031c584SApple OSS Distributionsvalues 1093*1031c584SApple OSS Distributions.Dv CS5 , 1094*1031c584SApple OSS Distributions.Dv CS6 , 1095*1031c584SApple OSS Distributions.Dv CS7 , 1096*1031c584SApple OSS Distributionsor 1097*1031c584SApple OSS Distributions.Dv CS8 . 1098*1031c584SApple OSS DistributionsThis size does not include the parity bit, if any. If 1099*1031c584SApple OSS Distributions.Dv CSTOPB 1100*1031c584SApple OSS Distributionsis set, two stop bits are used, otherwise one stop bit. For example, at 1101*1031c584SApple OSS Distributions110 baud, two stop bits are normally used. 1102*1031c584SApple OSS Distributions.Pp 1103*1031c584SApple OSS DistributionsIf 1104*1031c584SApple OSS Distributions.Dv CREAD 1105*1031c584SApple OSS Distributionsis set, the receiver is enabled. Otherwise, no character is 1106*1031c584SApple OSS Distributionsreceived. 1107*1031c584SApple OSS DistributionsNot all hardware supports this bit. In fact, this flag 1108*1031c584SApple OSS Distributionsis pretty silly and if it were not part of the 1109*1031c584SApple OSS Distributions.Nm termios 1110*1031c584SApple OSS Distributionsspecification 1111*1031c584SApple OSS Distributionsit would be omitted. 1112*1031c584SApple OSS Distributions.Pp 1113*1031c584SApple OSS DistributionsIf 1114*1031c584SApple OSS Distributions.Dv PARENB 1115*1031c584SApple OSS Distributionsis set, parity generation and detection are enabled and a parity 1116*1031c584SApple OSS Distributionsbit is added to each character. If parity is enabled, 1117*1031c584SApple OSS Distributions.Dv PARODD 1118*1031c584SApple OSS Distributionsspecifies 1119*1031c584SApple OSS Distributionsodd parity if set, otherwise even parity is used. 1120*1031c584SApple OSS Distributions.Pp 1121*1031c584SApple OSS DistributionsIf 1122*1031c584SApple OSS Distributions.Dv HUPCL 1123*1031c584SApple OSS Distributionsis set, the modem control lines for the port are lowered 1124*1031c584SApple OSS Distributionswhen the last process with the port open closes the port or the process 1125*1031c584SApple OSS Distributionsterminates. The modem connection is broken. 1126*1031c584SApple OSS Distributions.Pp 1127*1031c584SApple OSS DistributionsIf 1128*1031c584SApple OSS Distributions.Dv CLOCAL 1129*1031c584SApple OSS Distributionsis set, a connection does not depend on the state of the modem 1130*1031c584SApple OSS Distributionsstatus lines. If 1131*1031c584SApple OSS Distributions.Dv CLOCAL 1132*1031c584SApple OSS Distributionsis clear, the modem status lines are 1133*1031c584SApple OSS Distributionsmonitored. 1134*1031c584SApple OSS Distributions.Pp 1135*1031c584SApple OSS DistributionsUnder normal circumstances, a call to the open() function waits for 1136*1031c584SApple OSS Distributionsthe modem connection to complete. However, if the 1137*1031c584SApple OSS Distributions.Dv O_NONBLOCK 1138*1031c584SApple OSS Distributionsflag is set 1139*1031c584SApple OSS Distributionsor if 1140*1031c584SApple OSS Distributions.Dv CLOCAL 1141*1031c584SApple OSS Distributionshas been set, the open() function returns 1142*1031c584SApple OSS Distributionsimmediately without waiting for the connection. 1143*1031c584SApple OSS Distributions.Pp 1144*1031c584SApple OSS DistributionsThe 1145*1031c584SApple OSS Distributions.Dv CCTS_OFLOW 1146*1031c584SApple OSS Distributions.Pf ( Dv CRTSCTS ) 1147*1031c584SApple OSS Distributionsflag is currently unused. 1148*1031c584SApple OSS Distributions.Pp 1149*1031c584SApple OSS DistributionsIf 1150*1031c584SApple OSS Distributions.Dv MDMBUF 1151*1031c584SApple OSS Distributionsis set then output flow control is controlled by the state 1152*1031c584SApple OSS Distributionsof Carrier Detect. 1153*1031c584SApple OSS Distributions.Pp 1154*1031c584SApple OSS DistributionsIf the object for which the control modes are set is not an asynchronous 1155*1031c584SApple OSS Distributionsserial connection, some of the modes may be ignored; for example, if an 1156*1031c584SApple OSS Distributionsattempt is made to set the baud rate on a network connection to a 1157*1031c584SApple OSS Distributionsterminal on another host, the baud rate may or may not be set on the 1158*1031c584SApple OSS Distributionsconnection between that terminal and the machine it is directly connected 1159*1031c584SApple OSS Distributionsto. 1160*1031c584SApple OSS Distributions.Ss Local Modes 1161*1031c584SApple OSS DistributionsValues of the 1162*1031c584SApple OSS Distributions.Fa c_lflag 1163*1031c584SApple OSS Distributionsfield describe the control of 1164*1031c584SApple OSS Distributionsvarious functions, and are composed of the following 1165*1031c584SApple OSS Distributionsmasks. 1166*1031c584SApple OSS Distributions.Pp 1167*1031c584SApple OSS Distributions.Bl -tag -width NOKERNINFO -offset indent -compact 1168*1031c584SApple OSS Distributions.It Dv ECHOKE 1169*1031c584SApple OSS Distributions/* visual erase for line kill */ 1170*1031c584SApple OSS Distributions.It Dv ECHOE 1171*1031c584SApple OSS Distributions/* visually erase chars */ 1172*1031c584SApple OSS Distributions.It Dv ECHO 1173*1031c584SApple OSS Distributions/* enable echoing */ 1174*1031c584SApple OSS Distributions.It Dv ECHONL 1175*1031c584SApple OSS Distributions/* echo 1176*1031c584SApple OSS Distributions.Dv NL 1177*1031c584SApple OSS Distributionseven if 1178*1031c584SApple OSS Distributions.Dv ECHO 1179*1031c584SApple OSS Distributionsis off */ 1180*1031c584SApple OSS Distributions.It Dv ECHOPRT 1181*1031c584SApple OSS Distributions/* visual erase mode for hardcopy */ 1182*1031c584SApple OSS Distributions.It Dv ECHOCTL 1183*1031c584SApple OSS Distributions/* echo control chars as ^(Char) */ 1184*1031c584SApple OSS Distributions.It Dv ISIG 1185*1031c584SApple OSS Distributions/* enable signals 1186*1031c584SApple OSS Distributions.Dv INTR , 1187*1031c584SApple OSS Distributions.Dv QUIT , 1188*1031c584SApple OSS Distributions.Dv [D]SUSP 1189*1031c584SApple OSS Distributions*/ 1190*1031c584SApple OSS Distributions.It Dv ICANON 1191*1031c584SApple OSS Distributions/* canonicalize input lines */ 1192*1031c584SApple OSS Distributions.It Dv ALTWERASE 1193*1031c584SApple OSS Distributions/* use alternate 1194*1031c584SApple OSS Distributions.Dv WERASE 1195*1031c584SApple OSS Distributionsalgorithm */ 1196*1031c584SApple OSS Distributions.It Dv IEXTEN 1197*1031c584SApple OSS Distributions/* enable 1198*1031c584SApple OSS Distributions.Dv DISCARD 1199*1031c584SApple OSS Distributionsand 1200*1031c584SApple OSS Distributions.Dv LNEXT 1201*1031c584SApple OSS Distributions*/ 1202*1031c584SApple OSS Distributions.It Dv EXTPROC 1203*1031c584SApple OSS Distributions/* external processing */ 1204*1031c584SApple OSS Distributions.It Dv TOSTOP 1205*1031c584SApple OSS Distributions/* stop background jobs from output */ 1206*1031c584SApple OSS Distributions.It Dv FLUSHO 1207*1031c584SApple OSS Distributions/* output being flushed (state) */ 1208*1031c584SApple OSS Distributions.It Dv NOKERNINFO 1209*1031c584SApple OSS Distributions/* no kernel output from 1210*1031c584SApple OSS Distributions.Dv VSTATUS 1211*1031c584SApple OSS Distributions*/ 1212*1031c584SApple OSS Distributions.It Dv PENDIN 1213*1031c584SApple OSS Distributions/* XXX retype pending input (state) */ 1214*1031c584SApple OSS Distributions.It Dv NOFLSH 1215*1031c584SApple OSS Distributions/* don't flush after interrupt */ 1216*1031c584SApple OSS Distributions.El 1217*1031c584SApple OSS Distributions.Pp 1218*1031c584SApple OSS DistributionsIf 1219*1031c584SApple OSS Distributions.Dv ECHO 1220*1031c584SApple OSS Distributionsis set, input characters are echoed back to the terminal. If 1221*1031c584SApple OSS Distributions.Dv ECHO 1222*1031c584SApple OSS Distributionsis not set, input characters are not echoed. 1223*1031c584SApple OSS Distributions.Pp 1224*1031c584SApple OSS DistributionsIf 1225*1031c584SApple OSS Distributions.Dv ECHOE 1226*1031c584SApple OSS Distributionsand 1227*1031c584SApple OSS Distributions.Dv ICANON 1228*1031c584SApple OSS Distributionsare set, the 1229*1031c584SApple OSS Distributions.Dv ERASE 1230*1031c584SApple OSS Distributionscharacter causes the terminal 1231*1031c584SApple OSS Distributionsto erase the last character in the current line from the display, if 1232*1031c584SApple OSS Distributionspossible. If there is no character to erase, an implementation may echo 1233*1031c584SApple OSS Distributionsan indication that this was the case or do nothing. 1234*1031c584SApple OSS Distributions.Pp 1235*1031c584SApple OSS DistributionsIf 1236*1031c584SApple OSS Distributions.Dv ECHOK 1237*1031c584SApple OSS Distributionsand 1238*1031c584SApple OSS Distributions.Dv ICANON 1239*1031c584SApple OSS Distributionsare set, the 1240*1031c584SApple OSS Distributions.Dv KILL 1241*1031c584SApple OSS Distributionscharacter causes 1242*1031c584SApple OSS Distributionsthe current line to be discarded and the system echoes the 1243*1031c584SApple OSS Distributions.Ql \&\en 1244*1031c584SApple OSS Distributionscharacter after the 1245*1031c584SApple OSS Distributions.Dv KILL 1246*1031c584SApple OSS Distributionscharacter. 1247*1031c584SApple OSS Distributions.Pp 1248*1031c584SApple OSS DistributionsIf 1249*1031c584SApple OSS Distributions.Dv ECHOKE 1250*1031c584SApple OSS Distributionsand 1251*1031c584SApple OSS Distributions.Dv ICANON 1252*1031c584SApple OSS Distributionsare set, the 1253*1031c584SApple OSS Distributions.Dv KILL 1254*1031c584SApple OSS Distributionscharacter causes 1255*1031c584SApple OSS Distributionsthe current line to be discarded and the system causes 1256*1031c584SApple OSS Distributionsthe terminal 1257*1031c584SApple OSS Distributionsto erase the line from the display. 1258*1031c584SApple OSS Distributions.Pp 1259*1031c584SApple OSS DistributionsIf 1260*1031c584SApple OSS Distributions.Dv ECHOPRT 1261*1031c584SApple OSS Distributionsand 1262*1031c584SApple OSS Distributions.Dv ICANON 1263*1031c584SApple OSS Distributionsare set, the system assumes 1264*1031c584SApple OSS Distributionsthat the display is a printing device and prints a 1265*1031c584SApple OSS Distributionsbackslash and the erased characters when processing 1266*1031c584SApple OSS Distributions.Dv ERASE 1267*1031c584SApple OSS Distributionscharacters, followed by a forward slash. 1268*1031c584SApple OSS Distributions.Pp 1269*1031c584SApple OSS DistributionsIf 1270*1031c584SApple OSS Distributions.Dv ECHOCTL 1271*1031c584SApple OSS Distributionsis set, the system echoes control characters 1272*1031c584SApple OSS Distributionsin a visible fashion using a caret followed by the control character. 1273*1031c584SApple OSS Distributions.Pp 1274*1031c584SApple OSS DistributionsIf 1275*1031c584SApple OSS Distributions.Dv ALTWERASE 1276*1031c584SApple OSS Distributionsis set, the system uses an alternative algorithm 1277*1031c584SApple OSS Distributionsfor determining what constitutes a word when processing 1278*1031c584SApple OSS Distributions.Dv WERASE 1279*1031c584SApple OSS Distributionscharacters (see 1280*1031c584SApple OSS Distributions.Dv WERASE ) . 1281*1031c584SApple OSS Distributions.Pp 1282*1031c584SApple OSS DistributionsIf 1283*1031c584SApple OSS Distributions.Dv ECHONL 1284*1031c584SApple OSS Distributionsand 1285*1031c584SApple OSS Distributions.Dv ICANON 1286*1031c584SApple OSS Distributionsare set, the 1287*1031c584SApple OSS Distributions.Ql \&\en 1288*1031c584SApple OSS Distributionscharacter echoes even if 1289*1031c584SApple OSS Distributions.Dv ECHO 1290*1031c584SApple OSS Distributionsis not set. 1291*1031c584SApple OSS Distributions.Pp 1292*1031c584SApple OSS DistributionsIf 1293*1031c584SApple OSS Distributions.Dv ICANON 1294*1031c584SApple OSS Distributionsis set, canonical processing is enabled. This enables the 1295*1031c584SApple OSS Distributionserase and kill edit functions, and the assembly of input characters into 1296*1031c584SApple OSS Distributionslines delimited by 1297*1031c584SApple OSS Distributions.Dv NL, 1298*1031c584SApple OSS Distributions.Dv EOF , 1299*1031c584SApple OSS Distributionsand 1300*1031c584SApple OSS Distributions.Dv EOL, 1301*1031c584SApple OSS Distributionsas described in 1302*1031c584SApple OSS Distributions.Sx "Canonical Mode Input Processing" . 1303*1031c584SApple OSS Distributions.Pp 1304*1031c584SApple OSS DistributionsIf 1305*1031c584SApple OSS Distributions.Dv ICANON 1306*1031c584SApple OSS Distributionsis not set, read requests are satisfied directly from the input 1307*1031c584SApple OSS Distributionsqueue. A read is not satisfied until at least 1308*1031c584SApple OSS Distributions.Dv MIN 1309*1031c584SApple OSS Distributionsbytes have been 1310*1031c584SApple OSS Distributionsreceived or the timeout value 1311*1031c584SApple OSS Distributions.Dv TIME 1312*1031c584SApple OSS Distributionsexpired between bytes. The time value 1313*1031c584SApple OSS Distributionsrepresents tenths of seconds. See 1314*1031c584SApple OSS Distributions.Sx "Noncanonical Mode Input Processing" 1315*1031c584SApple OSS Distributionsfor more details. 1316*1031c584SApple OSS Distributions.Pp 1317*1031c584SApple OSS DistributionsIf 1318*1031c584SApple OSS Distributions.Dv ISIG 1319*1031c584SApple OSS Distributionsis set, each input character is checked against the special 1320*1031c584SApple OSS Distributionscontrol characters 1321*1031c584SApple OSS Distributions.Dv INTR , 1322*1031c584SApple OSS Distributions.Dv QUIT , 1323*1031c584SApple OSS Distributionsand 1324*1031c584SApple OSS Distributions.Dv SUSP 1325*1031c584SApple OSS Distributions(job control only). If an input 1326*1031c584SApple OSS Distributionscharacter matches one of these control characters, the function 1327*1031c584SApple OSS Distributionsassociated with that character is performed. If 1328*1031c584SApple OSS Distributions.Dv ISIG 1329*1031c584SApple OSS Distributionsis not set, no 1330*1031c584SApple OSS Distributionschecking is done. Thus these special input functions are possible only 1331*1031c584SApple OSS Distributionsif 1332*1031c584SApple OSS Distributions.Dv ISIG 1333*1031c584SApple OSS Distributionsis set. 1334*1031c584SApple OSS Distributions.Pp 1335*1031c584SApple OSS DistributionsIf 1336*1031c584SApple OSS Distributions.Dv IEXTEN 1337*1031c584SApple OSS Distributionsis set, implementation-defined functions are recognized 1338*1031c584SApple OSS Distributionsfrom the input data. How 1339*1031c584SApple OSS Distributions.Dv IEXTEN 1340*1031c584SApple OSS Distributionsbeing set 1341*1031c584SApple OSS Distributionsinteracts with 1342*1031c584SApple OSS Distributions.Dv ICANON , 1343*1031c584SApple OSS Distributions.Dv ISIG , 1344*1031c584SApple OSS Distributions.Dv IXON , 1345*1031c584SApple OSS Distributionsor 1346*1031c584SApple OSS Distributions.Dv IXOFF 1347*1031c584SApple OSS Distributionsis implementation defined. 1348*1031c584SApple OSS DistributionsIf 1349*1031c584SApple OSS Distributions.Dv IEXTEN 1350*1031c584SApple OSS Distributionsis not set, then 1351*1031c584SApple OSS Distributionsimplementation-defined functions are not recognized, and the 1352*1031c584SApple OSS Distributionscorresponding input characters are not processed as described for 1353*1031c584SApple OSS Distributions.Dv ICANON , 1354*1031c584SApple OSS Distributions.Dv ISIG , 1355*1031c584SApple OSS Distributions.Dv IXON , 1356*1031c584SApple OSS Distributionsand 1357*1031c584SApple OSS Distributions.Dv IXOFF . 1358*1031c584SApple OSS Distributions.Pp 1359*1031c584SApple OSS DistributionsIf 1360*1031c584SApple OSS Distributions.Dv NOFLSH 1361*1031c584SApple OSS Distributionsis set, the normal flush of the input and output queues 1362*1031c584SApple OSS Distributionsassociated with the 1363*1031c584SApple OSS Distributions.Dv INTR , 1364*1031c584SApple OSS Distributions.Dv QUIT , 1365*1031c584SApple OSS Distributionsand 1366*1031c584SApple OSS Distributions.Dv SUSP 1367*1031c584SApple OSS Distributionscharacters 1368*1031c584SApple OSS Distributionsare not be done. 1369*1031c584SApple OSS Distributions.Pp 1370*1031c584SApple OSS DistributionsIf 1371*1031c584SApple OSS Distributions.Dv ICANON 1372*1031c584SApple OSS Distributionsis set, an upper case character is preserved on input if prefixed by 1373*1031c584SApple OSS Distributionsa \\ character. In addition, this prefix is added to upper case 1374*1031c584SApple OSS Distributionscharacters on output. 1375*1031c584SApple OSS Distributions.Pp 1376*1031c584SApple OSS DistributionsIn addition, the following special character translations are in effect: 1377*1031c584SApple OSS Distributions.Pp 1378*1031c584SApple OSS Distributions.Bl -column "for:" "use:" -offset indent -compact 1379*1031c584SApple OSS Distributions.It Em "for: use:" 1380*1031c584SApple OSS Distributions.It Dv ` Ta \&\e' 1381*1031c584SApple OSS Distributions.It Dv | Ta \&\e! 1382*1031c584SApple OSS Distributions.It Dv ~ Ta \&\e^ 1383*1031c584SApple OSS Distributions.It Dv { Ta \&\e( 1384*1031c584SApple OSS Distributions.It Dv } Ta \&\e) 1385*1031c584SApple OSS Distributions.It Dv \&\e Ta \&\e\e 1386*1031c584SApple OSS Distributions.El 1387*1031c584SApple OSS Distributions.Pp 1388*1031c584SApple OSS DistributionsIf 1389*1031c584SApple OSS Distributions.Dv TOSTOP 1390*1031c584SApple OSS Distributionsis set, the signal 1391*1031c584SApple OSS Distributions.Dv SIGTTOU 1392*1031c584SApple OSS Distributionsis sent to the process group of a process that tries to write to 1393*1031c584SApple OSS Distributionsits controlling terminal if it is not in the foreground process group for 1394*1031c584SApple OSS Distributionsthat terminal. This signal, by default, stops the members of the process 1395*1031c584SApple OSS Distributionsgroup. Otherwise, the output generated by that process is output to the 1396*1031c584SApple OSS Distributionscurrent output stream. Processes that are blocking or ignoring 1397*1031c584SApple OSS Distributions.Dv SIGTTOU 1398*1031c584SApple OSS Distributionssignals are excepted and allowed to produce output and the 1399*1031c584SApple OSS Distributions.Dv SIGTTOU 1400*1031c584SApple OSS Distributionssignal 1401*1031c584SApple OSS Distributionsis not sent. 1402*1031c584SApple OSS Distributions.Pp 1403*1031c584SApple OSS DistributionsIf 1404*1031c584SApple OSS Distributions.Dv NOKERNINFO 1405*1031c584SApple OSS Distributionsis set, the kernel does not produce a status message 1406*1031c584SApple OSS Distributionswhen processing 1407*1031c584SApple OSS Distributions.Dv STATUS 1408*1031c584SApple OSS Distributionscharacters (see 1409*1031c584SApple OSS Distributions.Dv STATUS ) . 1410*1031c584SApple OSS Distributions.Ss Special Control Characters 1411*1031c584SApple OSS DistributionsThe special control characters values are defined by the array 1412*1031c584SApple OSS Distributions.Fa c_cc . 1413*1031c584SApple OSS DistributionsThis table lists the array index, the corresponding special character, 1414*1031c584SApple OSS Distributionsand the system default value. For an accurate list of 1415*1031c584SApple OSS Distributionsthe system defaults, consult the header file 1416*1031c584SApple OSS Distributions.Aq Pa ttydefaults.h . 1417*1031c584SApple OSS Distributions.Pp 1418*1031c584SApple OSS Distributions.Bl -column "Index Name" "Special Character" -offset indent -compact 1419*1031c584SApple OSS Distributions.It Em "Index Name Special Character Default Value" 1420*1031c584SApple OSS Distributions.It Dv VEOF Ta EOF Ta \&^D 1421*1031c584SApple OSS Distributions.It Dv VEOL Ta EOL Ta _POSIX_VDISABLE 1422*1031c584SApple OSS Distributions.It Dv VEOL2 Ta EOL2 Ta _POSIX_VDISABLE 1423*1031c584SApple OSS Distributions.It Dv VERASE Ta ERASE Ta \&^? Ql \&\e177 1424*1031c584SApple OSS Distributions.It Dv VWERASE Ta WERASE Ta \&^W 1425*1031c584SApple OSS Distributions.It Dv VKILL Ta KILL Ta \&^U 1426*1031c584SApple OSS Distributions.It Dv VREPRINT Ta REPRINT Ta \&^R 1427*1031c584SApple OSS Distributions.It Dv VINTR Ta INTR Ta \&^C 1428*1031c584SApple OSS Distributions.It Dv VQUIT Ta QUIT Ta \&^\e\e Ql \&\e34 1429*1031c584SApple OSS Distributions.It Dv VSUSP Ta SUSP Ta \&^Z 1430*1031c584SApple OSS Distributions.It Dv VDSUSP Ta DSUSP Ta \&^Y 1431*1031c584SApple OSS Distributions.It Dv VSTART Ta START Ta \&^Q 1432*1031c584SApple OSS Distributions.It Dv VSTOP Ta STOP Ta \&^S 1433*1031c584SApple OSS Distributions.It Dv VLNEXT Ta LNEXT Ta \&^V 1434*1031c584SApple OSS Distributions.It Dv VDISCARD Ta DISCARD Ta \&^O 1435*1031c584SApple OSS Distributions.It Dv VMIN Ta --- Ta \&1 1436*1031c584SApple OSS Distributions.It Dv VTIME Ta --- Ta \&0 1437*1031c584SApple OSS Distributions.It Dv VSTATUS Ta STATUS Ta \&^T 1438*1031c584SApple OSS Distributions.El 1439*1031c584SApple OSS Distributions.Pp 1440*1031c584SApple OSS DistributionsIf the 1441*1031c584SApple OSS Distributionsvalue of one of the changeable special control characters (see 1442*1031c584SApple OSS Distributions.Sx "Special Characters" ) 1443*1031c584SApple OSS Distributionsis 1444*1031c584SApple OSS Distributions.Dv {_POSIX_VDISABLE} , 1445*1031c584SApple OSS Distributionsthat function is disabled; that is, no input 1446*1031c584SApple OSS Distributionsdata is recognized as the disabled special character. 1447*1031c584SApple OSS DistributionsIf 1448*1031c584SApple OSS Distributions.Dv ICANON 1449*1031c584SApple OSS Distributionsis 1450*1031c584SApple OSS Distributionsnot set, the value of 1451*1031c584SApple OSS Distributions.Dv {_POSIX_VDISABLE} 1452*1031c584SApple OSS Distributionshas no special meaning for the 1453*1031c584SApple OSS Distributions.Dv VMIN 1454*1031c584SApple OSS Distributionsand 1455*1031c584SApple OSS Distributions.Dv VTIME 1456*1031c584SApple OSS Distributionsentries of the 1457*1031c584SApple OSS Distributions.Fa c_cc 1458*1031c584SApple OSS Distributionsarray. 1459*1031c584SApple OSS Distributions.Pp 1460*1031c584SApple OSS DistributionsThe initial values of the flags and control characters 1461*1031c584SApple OSS Distributionsafter open() is set according to 1462*1031c584SApple OSS Distributionsthe values in the header 1463*1031c584SApple OSS Distributions.Aq Pa sys/ttydefaults.h . 1464*1031c584SApple OSS Distributions.Sh SEE ALSO 1465*1031c584SApple OSS Distributions.Xr tcgetattr 3 , 1466*1031c584SApple OSS Distributions.Xr tcsetattr 3 1467