IPnom Home • Manuals • FreeBSD

 FreeBSD Man Pages

Man Sections:Commands (1)System Calls (2)Library Functions (3)Device Drivers (4)File Formats (5)Miscellaneous (7)System Utilities (8)
Keyword Live Search (10 results max):
 Type in part of a command in the search box.
 
Index:
  CPU_ELAN(4)
  CPU_SOEKRIS(4)
  aac(4)
  acd(4)
  acpi(4)
  acpi_asus(4)
  acpi_panasonic(4)
  acpi_thermal(4)
  acpi_toshiba(4)
  acpi_video(4)
  ad(4)
  adv(4)
  adw(4)
  afd(4)
  agp(4)
  agpgart(4)
  aha(4)
  ahb(4)
  ahc(4)
  ahd(4)
  aic(4)
  aio(4)
  alpm(4)
  altq(4)
  amd(4)
  amdpm(4)
  amr(4)
  an(4)
  apm(4)
  ar(4)
  arcmsr(4)
  arl(4)
  arp(4)
  asr(4)
  ast(4)
  ata(4)
  atapicam(4)
  ath(4)
  ath_hal(4)
  atkbd(4)
  atkbdc(4)
  aue(4)
  awi(4)
  axe(4)
  bfe(4)
  bge(4)
  bktr(4)
  blackhole(4)
  bpf(4)
  bridge(4)
  brooktree(4)
  bt(4)
  cam(4)
  card(4)
  cardbus(4)
  carp(4)
  cbb(4)
  ccd(4)
  cd(4)
  cdce(4)
  ch(4)
  ciss(4)
  cm(4)
  cnw(4)
  cp(4)
  cpufreq(4)
  crypto(4)
  cryptodev(4)
  cs(4)
  ct(4)
  ctau(4)
  cue(4)
  cx(4)
  cy(4)
  da(4)
  dc(4)
  dcons(4)
  dcons_crom(4)
  ddb(4)
  de(4)
  devctl(4)
  digi(4)
  disc(4)
  divert(4)
  dpt(4)
  dummynet(4)
  ed(4)
  ef(4)
  ehci(4)
  el(4)
  em(4)
  en(4)
  ep(4)
  esp(4)
  ex(4)
  exca(4)
  faith(4)
  fast_ipsec(4)
  fatm(4)
  fd(4)
  fdc(4)
  fe(4)
  fea(4)
  firewire(4)
  fla(4)
  fpa(4)
  fwe(4)
  fwip(4)
  fwohci(4)
  fxp(4)
  gbde(4)
  gdb(4)
  gem(4)
  geom(4)
  gif(4)
  gre(4)
  gx(4)
  harp(4)
  hatm(4)
  hfa(4)
  hifn(4)
  hme(4)
  hptmv(4)
  i4b(4)
  i4bcapi(4)
  i4bctl(4)
  i4bing(4)
  i4bipr(4)
  i4bisppp(4)
  i4bq921(4)
  i4bq931(4)
  i4brbch(4)
  i4btel(4)
  i4btrc(4)
  iavc(4)
  ichsmb(4)
  ichwd(4)
  icmp(4)
  icmp6(4)
  ida(4)
  idt(4)
  ie(4)
  ieee80211(4)
  if_an(4)
  if_aue(4)
  if_awi(4)
  if_axe(4)
  if_bfe(4)
  if_bge(4)
  if_cue(4)
  if_dc(4)
  if_de(4)
  if_disc(4)
  if_ed(4)
  if_ef(4)
  if_em(4)
  if_en(4)
  if_faith(4)
  if_fatm(4)
  if_fwe(4)
  if_fwip(4)
  if_fxp(4)
  if_gem(4)
  if_gif(4)
  if_gre(4)
  if_gx(4)
  if_hatm(4)
  if_hme(4)
  if_idt(4)
  if_kue(4)
  if_lge(4)
  if_my(4)
  if_ndis(4)
  if_nge(4)
  if_oltr(4)
  if_patm(4)
  if_pcn(4)
  if_ppp(4)
  if_re(4)
  if_rl(4)
  if_rue(4)
  if_sbni(4)
  if_sbsh(4)
  if_sf(4)
  if_sis(4)
  if_sk(4)
  if_sl(4)
  if_sn(4)
  if_ste(4)
  if_stf(4)
  if_tap(4)
  if_ti(4)
  if_tl(4)
  if_tun(4)
  if_tx(4)
  if_txp(4)
  if_udav(4)
  if_vge(4)
  if_vlan(4)
  if_vr(4)
  if_wb(4)
  if_wi(4)
  if_xe(4)
  if_xl(4)
  ifmib(4)
  ifpi(4)
  ifpi2(4)
  ifpnp(4)
  ihfc(4)
  iic(4)
  iicbb(4)
  iicbus(4)
  iicsmb(4)
  iir(4)
  imm(4)
  inet(4)
  inet6(4)
  intpm(4)
  intro(4)
  io(4)
  ip(4)
  ip6(4)
  ipaccounting(4)
  ipacct(4)
  ipf(4)
  ipfirewall(4)
  ipfw(4)
  ipl(4)
  ipnat(4)
  ips(4)
  ipsec(4)
  isic(4)
  isp(4)
  ispfw(4)
  itjc(4)
  iwic(4)
  ixgb(4)
  joy(4)
  kame(4)
  keyboard(4)
  kld(4)
  kmem(4)
  ktr(4)
  kue(4)
  led(4)
  lge(4)
  linux(4)
  lnc(4)
  lo(4)
  longrun(4)
  loop(4)
  lp(4)
  lpbb(4)
  lpt(4)
  mac(4)
  mac_biba(4)
  mac_bsdextended(4)
  mac_ifoff(4)
  mac_lomac(4)
  mac_mls(4)
  mac_none(4)
  mac_partition(4)
  mac_portacl(4)
  mac_seeotheruids(4)
  mac_stub(4)
  mac_test(4)
  mcd(4)
  md(4)
  mem(4)
  meteor(4)
  miibus(4)
  mlx(4)
  mly(4)
  mouse(4)
  mpt(4)
  mse(4)
  mtio(4)
  multicast(4)
  my(4)
  natm(4)
  natmip(4)
  ncr(4)
  ncv(4)
  ndis(4)
  net(4)
  netgraph(4)
  netintro(4)
  networking(4)
  ng_UI(4)
  ng_async(4)
  ng_atm(4)
  ng_atmllc(4)
  ng_atmpif(4)
  ng_bluetooth(4)
  ng_bpf(4)
  ng_bridge(4)
  ng_bt3c(4)
  ng_btsocket(4)
  ng_ccatm(4)
  ng_cisco(4)
  ng_device(4)
  ng_echo(4)
  ng_eiface(4)
  ng_etf(4)
  ng_ether(4)
  ng_fec(4)
  ng_frame_relay(4)
  ng_gif(4)
  ng_gif_demux(4)
  ng_h4(4)
  ng_hci(4)
  ng_hole(4)
  ng_hub(4)
  ng_iface(4)
  ng_ip_input(4)
  ng_ksocket(4)
  ng_l2cap(4)
  ng_l2tp(4)
  ng_lmi(4)
  ng_mppc(4)
  ng_netflow(4)
  ng_one2many(4)
  ng_ppp(4)
  ng_pppoe(4)
  ng_pptpgre(4)
  ng_rfc1490(4)
  ng_socket(4)
  ng_split(4)
  ng_sppp(4)
  ng_sscfu(4)
  ng_sscop(4)
  ng_tee(4)
  ng_tty(4)
  ng_ubt(4)
  ng_uni(4)
  ng_vjc(4)
  ng_vlan(4)
  nge(4)
  nmdm(4)
  npx(4)
  nsp(4)
  null(4)
  ohci(4)
  oldcard(4)
  oltr(4)
  opie(4)
  orm(4)
  pae(4)
  pass(4)
  patm(4)
  pccard(4)
  pccbb(4)
  pcf(4)
  pci(4)
  pcic(4)
  pcm(4)
  pcn(4)
  pcvt(4)
  perfmon(4)
  pf(4)
  pflog(4)
  pfsync(4)
  pim(4)
  plip(4)
  pnp(4)
  pnpbios(4)
  polling(4)
  ppbus(4)
  ppc(4)
  ppi(4)
  ppp(4)
  psm(4)
  pst(4)
  pt(4)
  pty(4)
  puc(4)
  random(4)
  rawip(4)
  ray(4)
  rc(4)
  re(4)
  rl(4)
  rndtest(4)
  route(4)
  rp(4)
  rue(4)
  sa(4)
  sab(4)
  safe(4)
  sbni(4)
  sbp(4)
  sbp_targ(4)
  sbsh(4)
  sc(4)
  scbus(4)
  scd(4)
  sched_4bsd(4)
  sched_ule(4)
  screen(4)
  screensaver(4)
  scsi(4)
  sem(4)
  ses(4)
  sf(4)
  si(4)
  sio(4)
  sis(4)
  sk(4)
  skey(4)
  sl(4)
  smapi(4)
  smb(4)
  smbus(4)
  smp(4)
  sn(4)
  snc(4)
  snd(4)
  snd_ad1816(4)
  snd_als4000(4)
  snd_cmi(4)
  snd_cs4281(4)
  snd_csa(4)
  snd_ds1(4)
  snd_emu10k1(4)
  snd_es137x(4)
  snd_ess(4)
  snd_fm801(4)
  snd_gusc(4)
  snd_ich(4)
  snd_maestro(4)
  snd_maestro3(4)
  snd_neomagic(4)
  snd_sbc(4)
  snd_solo(4)
  snd_uaudio(4)
  snd_via8233(4)
  snd_via82c686(4)
  snd_vibes(4)
  snp(4)
  sound(4)
  speaker(4)
  spic(4)
  spkr(4)
  splash(4)
  sppp(4)
  sr(4)
  stderr(4)
  stdin(4)
  stdout(4)
  ste(4)
  stf(4)
  stg(4)
  streams(4)
  svr4(4)
  sym(4)
  syncache(4)
  syncer(4)
  syncookies(4)
  syscons(4)
  sysmouse(4)
  tap(4)
  targ(4)
  tcp(4)
  tdfx(4)
  termios(4)
  ti(4)
  tl(4)
  trm(4)
  ttcp(4)
  tty(4)
  tun(4)
  twa(4)
  twe(4)
  tx(4)
  txp(4)
  uart(4)
  ubsa(4)
  ubsec(4)
  ubser(4)
  ubtbcmfw(4)
  ucom(4)
  udav(4)
  udbp(4)
  udp(4)
  ufm(4)
  uftdi(4)
  ugen(4)
  uhci(4)
  uhid(4)
  uhidev(4)
  ukbd(4)
  ulpt(4)
  umass(4)
  umct(4)
  umodem(4)
  ums(4)
  unix(4)
  uplcom(4)
  urio(4)
  usb(4)
  uscanner(4)
  utopia(4)
  uvisor(4)
  uvscom(4)
  vga(4)
  vge(4)
  viapm(4)
  vinum(4)
  vinumdebug(4)
  vlan(4)
  vn(4)
  vpd(4)
  vpo(4)
  vr(4)
  vt(4)
  vx(4)
  watchdog(4)
  wb(4)
  wd(4)
  wdc(4)
  wi(4)
  witness(4)
  wl(4)
  wlan(4)
  worm(4)
  xe(4)
  xl(4)
  xpt(4)
  zero(4)

termios(4)

NAME

     termios -- general terminal line discipline


SYNOPSIS

     #include <termios.h>


DESCRIPTION

     This describes a general terminal line discipline that is supported on
     tty asynchronous communication ports.

   Opening a Terminal Device File
     When a terminal file is opened, it normally causes the process to wait
     until a connection is established.  For most hardware, the presence of a
     connection is indicated by the assertion of the hardware CARRIER line.
     If the termios structure associated with the terminal file has the CLOCAL
     flag set in the cflag, or if the O_NONBLOCK flag is set in the open(2)
     call, then the open will succeed even without a connection being present.
     In practice, applications seldom open these files; they are opened by
     special programs, such as getty(8) or rlogind(8), and become an applica-
     tion's standard input, output, and error files.

   Job Control in a Nutshell
     Every process is associated with a particular process group and session.
     The grouping is hierarchical: every member of a particular process group
     is a member of the same session.  This structuring is used in managing
     groups of related processes for purposes of job control; that is, the
     ability from the keyboard (or from program control) to simultaneously
     stop or restart a complex command (a command composed of one or more
     related processes).  The grouping into process groups allows delivering
     of signals that stop or start the group as a whole, along with arbitrat-
     ing which process group has access to the single controlling terminal.
     The grouping at a higher layer into sessions is to restrict the job con-
     trol related signals and system calls to within processes resulting from
     a particular instance of a ``login''.  Typically, a session is created
     when a user logs in, and the login terminal is setup to be the control-
     ling terminal; all processes spawned from that login shell are in the
     same session, and inherit the controlling terminal.

     A job control shell operating interactively (that is, reading commands
     from a terminal) normally groups related processes together by placing
     them into the same process group.	A set of processes in the same process
     group is collectively referred to as a ``job''.  When the foreground
     process group of the terminal is the same as the process group of a par-
     ticular job, that job is said to be in the ``foreground''.  When the
     process group of the terminal is different from the process group of a
     job (but is still the controlling terminal), that job is said to be in
     the ``background''.  Normally the shell reads a command and starts the
     job that implements that command.	If the command is to be started in the
     foreground (typical), it sets the process group of the terminal to the
     process group of the started job, waits for the job to complete, and then
     sets the process group of the terminal back to its own process group (it
     puts itself into the foreground).	If the job is to be started in the
     background (as denoted by the shell operator "&"), it never changes the
     process group of the terminal and doesn't wait for the job to complete
     (that is, it immediately attempts to read the next command).  If the job
     is started in the foreground, the user may type a key (usually `^Z')
     which generates the terminal stop signal (SIGTSTP) and has the effect of
     ceptually it means a process group that doesn't have a parent that could
     do anything if it were to be stopped.  For example, the initial login
     shell is typically in an orphaned process group.  Orphaned process groups
     are immune to keyboard generated stop signals and job control signals
     resulting from reads or writes to the controlling terminal.

   The Controlling Terminal
     A terminal may belong to a process as its controlling terminal.  Each
     process of a session that has a controlling terminal has the same con-
     trolling terminal.  A terminal may be the controlling terminal for at
     most one session.	The controlling terminal for a session is allocated by
     the session leader by issuing the TIOCSCTTY ioctl.  A controlling termi-
     nal is never acquired by merely opening a terminal device file.  When a
     controlling terminal becomes associated with a session, its foreground
     process group is set to the process group of the session leader.

     The controlling terminal is inherited by a child process during a fork(2)
     function call.  A process relinquishes its controlling terminal when it
     creates a new session with the setsid(2) function; other processes
     remaining in the old session that had this terminal as their controlling
     terminal continue to have it.  A process does not relinquish its control-
     ling terminal simply by closing all of its file descriptors associated
     with the controlling terminal if other processes continue to have it
     open.

     When a controlling process terminates, the controlling terminal is disas-
     sociated from the current session, allowing it to be acquired by a new
     session leader.  Subsequent access to the terminal by other processes in
     the earlier session will be denied, with attempts to access the terminal
     treated as if modem disconnect had been sensed.

   Terminal Access Control
     If a process is in the foreground process group of its controlling termi-
     nal, read operations are allowed.	Any attempts by a process in a back-
     ground process group to read from its controlling terminal causes a
     SIGTTIN signal to be sent to the process's group unless one of the fol-
     lowing special cases apply: if the reading process is ignoring or block-
     ing the SIGTTIN signal, or if the process group of the reading process is
     orphaned, the read(2) returns -1 with errno set to EIO and no signal is
     sent.  The default action of the SIGTTIN signal is to stop the process to
     which it is sent.

     If a process is in the foreground process group of its controlling termi-
     nal, write operations are allowed.  Attempts by a process in a background
     process group to write to its controlling terminal will cause the process
     group to be sent a SIGTTOU signal unless one of the following special
     cases apply: if TOSTOP is not set, or if TOSTOP is set and the process is
     ignoring or blocking the SIGTTOU signal, the process is allowed to write
     to the terminal and the SIGTTOU signal is not sent.  If TOSTOP is set,
     and the process group of the writing process is orphaned, and the writing
     process is not ignoring or blocking SIGTTOU, the write(2) returns -1 with
     errno set to EIO and no signal is sent.

     Certain calls that set terminal parameters are treated in the same fash-
     ion as write, except that TOSTOP is ignored; that is, the effect is iden-
     tical to that of terminal writes when TOSTOP is set.

   Input Processing and Reading Data
     character each time a character is received while the input queue is
     full.  Otherwise, the input queue is flushed upon receiving the charac-
     ter.

     Two general kinds of input processing are available, determined by
     whether the terminal device file is in canonical mode or noncanonical
     mode.  Additionally, input characters are processed according to the
     c_iflag and c_lflag fields.  Such processing can include echoing, which
     in general means transmitting input characters immediately back to the
     terminal when they are received from the terminal.  This is useful for
     terminals that can operate in full-duplex mode.

     The manner in which data is provided to a process reading from a terminal
     device file is dependent on whether the terminal device file is in canon-
     ical or noncanonical mode.

     Another dependency is whether the O_NONBLOCK flag is set by open(2) or
     fcntl(2).	If the O_NONBLOCK flag is clear, then the read request is
     blocked until data is available or a signal has been received.  If the
     O_NONBLOCK flag is set, then the read request is completed, without
     blocking, in one of three ways:

	   1.	If there is enough data available to satisfy the entire
		request, and the read completes successfully the number of
		bytes read is returned.

	   2.	If there is not enough data available to satisfy the entire
		request, and the read completes successfully, having read as
		much data as possible, the number of bytes read is returned.

	   3.	If there is no data available, the read returns -1, with errno
		set to EAGAIN.

     When data is available depends on whether the input processing mode is
     canonical or noncanonical.

   Canonical Mode Input Processing
     In canonical mode input processing, terminal input is processed in units
     of lines.	A line is delimited by a newline `\n' character, an end-of-
     file (EOF) character, or an end-of-line (EOL) character.  See the Special
     Characters section for more information on EOF and EOL.  This means that
     a read request will not return until an entire line has been typed, or a
     signal has been received.	Also, no matter how many bytes are requested
     in the read call, at most one line is returned.  It is not, however, nec-
     essary to read a whole line at once; any number of bytes, even one, may
     be requested in a read without losing information.

     {MAX_CANON} is a limit on the number of bytes in a line.  The behavior of
     the system when this limit is exceeded is the same as when the input
     queue limit {MAX_INPUT}, is exceeded.

     Erase and kill processing occur when either of two special characters,
     the ERASE and KILL characters (see the Special Characters section), is
     received.	This processing affects data in the input queue that has not
     yet been delimited by a newline NL, EOF, or EOL character.  This un-
     delimited data makes up the current line.	The ERASE character deletes
     the last character in the current line, if there is any.  The KILL char-
     acter deletes all data in the current line, if there is any.  The ERASE
     process the bytes received.

     MIN represents the minimum number of bytes that should be received when
     the read(2) function successfully returns.  TIME is a timer of 0.1 second
     granularity that is used to time out bursty and short term data transmis-
     sions.  If MIN is greater than { MAX_INPUT}, the response to the request
     is undefined.  The four possible values for MIN and TIME and their inter-
     actions are described below.

   Case A: MIN > 0, TIME > 0
     In this case TIME serves as an inter-byte timer and is activated after
     the first byte is received.  Since it is an inter-byte timer, it is reset
     after a byte is received.	The interaction between MIN and TIME is as
     follows: as soon as one byte is received, the inter-byte timer is
     started.  If MIN bytes are received before the inter-byte timer expires
     (remember that the timer is reset upon receipt of each byte), the read is
     satisfied.  If the timer expires before MIN bytes are received, the char-
     acters received to that point are returned to the user.  Note that if
     TIME expires at least one byte is returned because the timer would not
     have been enabled unless a byte was received.  In this case (MIN > 0,
     TIME > 0) the read blocks until the MIN and TIME mechanisms are activated
     by the receipt of the first byte, or a signal is received.  If data is in
     the buffer at the time of the read(), the result is as if data had been
     received immediately after the read().

   Case B: MIN > 0, TIME = 0
     In this case, since the value of TIME is zero, the timer plays no role
     and only MIN is significant.  A pending read is not satisfied until MIN
     bytes are received (i.e., the pending read blocks until MIN bytes are
     received), or a signal is received.  A program that uses this case to
     read record-based terminal I/O may block indefinitely in the read opera-
     tion.

   Case C: MIN = 0, TIME > 0
     In this case, since MIN = 0, TIME no longer represents an inter-byte
     timer.  It now serves as a read timer that is activated as soon as the
     read function is processed.  A read is satisfied as soon as a single byte
     is received or the read timer expires.  Note that in this case if the
     timer expires, no bytes are returned.  If the timer does not expire, the
     only way the read can be satisfied is if a byte is received.  In this
     case the read will not block indefinitely waiting for a byte; if no byte
     is received within TIME*0.1 seconds after the read is initiated, the read
     returns a value of zero, having read no data.  If data is in the buffer
     at the time of the read, the timer is started as if data had been
     received immediately after the read.

   Case D: MIN = 0, TIME = 0
     The minimum of either the number of bytes requested or the number of
     bytes currently available is returned without waiting for more bytes to
     be input.	If no characters are available, read returns a value of zero,
     having read no data.

   Writing Data and Output Processing
     When a process writes one or more bytes to a terminal device file, they
     are processed according to the c_oflag field (see the Output Modes sec-
     tion).  The implementation may provide a buffering mechanism; as such,
     when a call to write() completes, all of the bytes written have been
     scheduled for transmission to the device, but the transmission will not
	     signal which is sent to all processes in the foreground process
	     group for which the terminal is the controlling terminal.	If
	     ISIG is set, the INTR character is discarded when processed.

     QUIT    Special character on input and is recognized if the ISIG flag is
	     enabled.  Generates a SIGQUIT signal which is sent to all pro-
	     cesses in the foreground process group for which the terminal is
	     the controlling terminal.	If ISIG is set, the QUIT character is
	     discarded when processed.

     ERASE   Special character on input and is recognized if the ICANON flag
	     is set.  Erases the last character in the current line; see
	     Canonical Mode Input Processing.  It does not erase beyond the
	     start of a line, as delimited by an NL, EOF, or EOL character.
	     If ICANON is set, the ERASE character is discarded when pro-
	     cessed.

     KILL    Special character on input and is recognized if the ICANON flag
	     is set.  Deletes the entire line, as delimited by a NL, EOF, or
	     EOL character.  If ICANON is set, the KILL character is discarded
	     when processed.

     EOF     Special character on input and is recognized if the ICANON flag
	     is set.  When received, all the bytes waiting to be read are
	     immediately passed to the process, without waiting for a newline,
	     and the EOF is discarded.	Thus, if there are no bytes waiting
	     (that is, the EOF occurred at the beginning of a line), a byte
	     count of zero is returned from the read(), representing an end-
	     of-file indication.  If ICANON is set, the EOF character is dis-
	     carded when processed.

     NL      Special character on input and is recognized if the ICANON flag
	     is set.  It is the line delimiter `\n'.

     EOL     Special character on input and is recognized if the ICANON flag
	     is set.  Is an additional line delimiter, like NL.

     SUSP    If the ISIG flag is enabled, receipt of the SUSP character causes
	     a SIGTSTP signal to be sent to all processes in the foreground
	     process group for which the terminal is the controlling terminal,
	     and the SUSP character is discarded when processed.

     STOP    Special character on both input and output and is recognized if
	     the IXON (output control) or IXOFF (input control) flag is set.
	     Can be used to temporarily suspend output.  It is useful with
	     fast terminals to prevent output from disappearing before it can
	     be read.  If IXON is set, the STOP character is discarded when
	     processed.

     START   Special character on both input and output and is recognized if
	     the IXON (output control) or IXOFF (input control) flag is set.
	     Can be used to resume output that has been suspended by a STOP
	     character.  If IXON is set, the START character is discarded when
	     processed.

     CR      Special character on input and is recognized if the ICANON flag
	     is set; it is the `\r', as denoted in the C Standard {2}.	When
	     ICANON and ICRNL are set and IGNCR is not set, this character is
	     is set.  Erases the last word in the current line according to
	     one of two algorithms.  If the ALTWERASE flag is not set, first
	     any preceding whitespace is erased, and then the maximal sequence
	     of non-whitespace characters.  If ALTWERASE is set, first any
	     preceding whitespace is erased, and then the maximal sequence of
	     alphabetic/underscores or non alphabetic/underscores.  As a spe-
	     cial case in this second algorithm, the first previous non-white-
	     space character is skipped in determining whether the preceding
	     word is a sequence of alphabetic/underscores.  This sounds con-
	     fusing but turns out to be quite practical.

     REPRINT
	     Special character on input and is recognized if the ICANON flag
	     is set.  Causes the current input edit line to be retyped.

     DSUSP   Has similar actions to the SUSP character, except that the
	     SIGTSTP signal is delivered when one of the processes in the
	     foreground process group issues a read() to the controlling ter-
	     minal.

     LNEXT   Special character on input and is recognized if the IEXTEN flag
	     is set.  Receipt of this character causes the next character to
	     be taken literally.

     DISCARD
	     Special character on input and is recognized if the IEXTEN flag
	     is set.  Receipt of this character toggles the flushing of termi-
	     nal output.

     STATUS  Special character on input and is recognized if the ICANON flag
	     is set.  Receipt of this character causes a SIGINFO signal to be
	     sent to the foreground process group of the terminal.  Also, if
	     the NOKERNINFO flag is not set, it causes the kernel to write a
	     status message to the terminal that displays the current load
	     average, the name of the command in the foreground, its process
	     ID, the symbolic wait channel, the number of user and system sec-
	     onds used, the percentage of cpu the process is getting, and the
	     resident set size of the process.

     The NL and CR characters cannot be changed.  The values for all the
     remaining characters can be set and are described later in the document
     under Special Control Characters.

     Special character functions associated with changeable special control
     characters can be disabled individually by setting their value to
     {_POSIX_VDISABLE}; see Special Control Characters.

     If two or more special characters have the same value, the function per-
     formed when that character is received is undefined.

   Modem Disconnect
     If a modem disconnect is detected by the terminal interface for a con-
     trolling terminal, and if CLOCAL is not set in the c_cflag field for the
     terminal, the SIGHUP signal is sent to the controlling process associated
     with the terminal.  Unless other arrangements have been made, this causes
     the controlling process to terminate.  Any subsequent call to the read()
     function returns the value zero, indicating end of file.  Thus, processes
     that read a terminal file and test for end-of-file can terminate appro-
     function, the terminal device performs a disconnect.

   Parameters That Can Be Set
     Routines that need to control certain terminal I/O characteristics do so
     by using the termios structure as defined in the header <termios.h>.
     This structure contains minimally four scalar elements of bit flags and
     one array of special characters.  The scalar flag elements are named:
     c_iflag, c_oflag, c_cflag, and c_lflag.  The character array is named
     c_cc, and its maximum index is NCCS.

   Input Modes
     Values of the c_iflag field describe the basic terminal input control,
     and are composed of following masks:

	   IGNBRK   /* ignore BREAK condition */
	   BRKINT   /* map BREAK to SIGINTR */
	   IGNPAR   /* ignore (discard) parity errors */
	   PARMRK   /* mark parity and framing errors */
	   INPCK    /* enable checking of parity errors */
	   ISTRIP   /* strip 8th bit off chars */
	   INLCR    /* map NL into CR */
	   IGNCR    /* ignore CR */
	   ICRNL    /* map CR to NL (ala CRMOD) */
	   IXON     /* enable output flow control */
	   IXOFF    /* enable input flow control */
	   IXANY    /* any char will restart after stop */
	   IMAXBEL  /* ring bell on input queue full */

     In the context of asynchronous serial data transmission, a break condi-
     tion is defined as a sequence of zero-valued bits that continues for more
     than the time to send one byte.  The entire sequence of zero-valued bits
     is interpreted as a single break condition, even if it continues for a
     time equivalent to more than one byte.  In contexts other than asynchro-
     nous serial data transmission the definition of a break condition is
     implementation defined.

     If IGNBRK is set, a break condition detected on input is ignored, that
     is, not put on the input queue and therefore not read by any process.  If
     IGNBRK is not set and BRKINT is set, the break condition flushes the
     input and output queues and if the terminal is the controlling terminal
     of a foreground process group, the break condition generates a single
     SIGINT signal to that foreground process group.  If neither IGNBRK nor
     BRKINT is set, a break condition is read as a single `\0', or if PARMRK
     is set, as `\377', `\0', `\0'.

     If IGNPAR is set, a byte with a framing or parity error (other than
     break) is ignored.

     If PARMRK is set, and IGNPAR is not set, a byte with a framing or parity
     error (other than break) is given to the application as the three-charac-
     ter sequence `\377', `\0', X, where `\377', `\0' is a two-character flag
     preceding each sequence and X is the data of the character received in
     error.  To avoid ambiguity in this case, if ISTRIP is not set, a valid
     character of `\377' is given to the application as `\377', `\377'.  If
     neither PARMRK nor IGNPAR is set, a framing or parity error (other than
     break) is given to the application as a single character `\0'.

     If INPCK is set, input parity checking is enabled.  If INPCK is not set,
     If ISTRIP is set, valid input bytes are first stripped to seven bits,
     otherwise all eight bits are processed.

     If INLCR is set, a received NL character is translated into a CR charac-
     ter.  If IGNCR is set, a received CR character is ignored (not read).  If
     IGNCR is not set and ICRNL is set, a received CR character is translated
     into a NL character.

     If IXON is set, start/stop output control is enabled.  A received STOP
     character suspends output and a received START character restarts output.
     If IXANY is also set, then any character may restart output.  When IXON
     is set, START and STOP characters are not read, but merely perform flow
     control functions.  When IXON is not set, the START and STOP characters
     are read.

     If IXOFF is set, start/stop input control is enabled.  The system shall
     transmit one or more STOP characters, which are intended to cause the
     terminal device to stop transmitting data, as needed to prevent the input
     queue from overflowing and causing the undefined behavior described in
     Input Processing and Reading Data, and shall transmit one or more START
     characters, which are intended to cause the terminal device to resume
     transmitting data, as soon as the device can continue transmitting data
     without risk of overflowing the input queue.  The precise conditions
     under which STOP and START characters are transmitted are implementation
     defined.

     If IMAXBEL is set and the input queue is full, subsequent input shall
     cause an ASCII BEL character to be transmitted to the output queue.

     The initial input control value after open() is implementation defined.

   Output Modes
     Values of the c_oflag field describe the basic terminal output control,
     and are composed of the following masks:

	   OPOST   /* enable following output processing */
	   ONLCR   /* map NL to CR-NL (ala CRMOD) */
	   OCRNL   /* map CR to NL */
	   OXTABS  /* expand tabs to spaces */
	   ONOEOT  /* discard EOT's `^D' on output) */
	   ONOCR   /* do not transmit CRs on column 0 */
	   ONLRET  /* on the terminal NL performs the CR function */

     If OPOST is set, the remaining flag masks are interpreted as follows;
     otherwise characters are transmitted without change.

     If ONLCR is set, newlines are translated to carriage return, linefeeds.

     If OCRNL is set, carriage returns are translated to newlines.

     If OXTABS is set, tabs are expanded to the appropriate number of spaces
     (assuming 8 column tab stops).

     If ONOEOT is set, ASCII EOT's are discarded on output.

     If ONOCR is set, no CR character is transmitted when at column 0 (first
     position).

	   CSIZE       /* character size mask */
	   CS5	       /* 5 bits (pseudo) */
	   CS6	       /* 6 bits */
	   CS7	       /* 7 bits */
	   CS8	       /* 8 bits */
	   CSTOPB      /* send 2 stop bits */
	   CREAD       /* enable receiver */
	   PARENB      /* parity enable */
	   PARODD      /* odd parity, else even */
	   HUPCL       /* hang up on last close */
	   CLOCAL      /* ignore modem status lines */
	   CCTS_OFLOW  /* CTS flow control of output */
	   CRTSCTS     /* same as CCTS_OFLOW */
	   CRTS_IFLOW  /* RTS flow control of input */
	   MDMBUF      /* flow control output via Carrier */

     The CSIZE bits specify the byte size in bits for both transmission and
     reception.  The c_cflag is masked with CSIZE and compared with the values
     CS5, CS6, CS7, or CS8.  This size does not include the parity bit, if
     any.  If CSTOPB is set, two stop bits are used, otherwise one stop bit.
     For example, at 110 baud, two stop bits are normally used.

     If CREAD is set, the receiver is enabled.	Otherwise, no character is
     received.	Not all hardware supports this bit.  In fact, this flag is
     pretty silly and if it were not part of the termios specification it
     would be omitted.

     If PARENB is set, parity generation and detection are enabled and a par-
     ity bit is added to each character.  If parity is enabled, PARODD speci-
     fies odd parity if set, otherwise even parity is used.

     If HUPCL is set, the modem control lines for the port are lowered when
     the last process with the port open closes the port or the process termi-
     nates.  The modem connection is broken.

     If CLOCAL is set, a connection does not depend on the state of the modem
     status lines.  If CLOCAL is clear, the modem status lines are monitored.

     Under normal circumstances, a call to the open() function waits for the
     modem connection to complete.  However, if the O_NONBLOCK flag is set or
     if CLOCAL has been set, the open() function returns immediately without
     waiting for the connection.

     The CCTS_OFLOW (CRTSCTS) flag is currently unused.

     If MDMBUF is set then output flow control is controlled by the state of
     Carrier Detect.

     If the object for which the control modes are set is not an asynchronous
     serial connection, some of the modes may be ignored; for example, if an
     attempt is made to set the baud rate on a network connection to a termi-
     nal on another host, the baud rate may or may not be set on the connec-
     tion between that terminal and the machine it is directly connected to.

   Local Modes
     Values of the c_lflag field describe the control of various functions,
     and are composed of the following masks.

	   ALTWERASE   /* use alternate WERASE algorithm */
	   IEXTEN      /* enable DISCARD and LNEXT */
	   EXTPROC     /* external processing */
	   TOSTOP      /* stop background jobs from output */
	   FLUSHO      /* output being flushed (state) */
	   NOKERNINFO  /* no kernel output from VSTATUS */
	   PENDIN      /* XXX retype pending input (state) */
	   NOFLSH      /* don't flush after interrupt */

     If ECHO is set, input characters are echoed back to the terminal.	If
     ECHO is not set, input characters are not echoed.

     If ECHOE and ICANON are set, the ERASE character causes the terminal to
     erase the last character in the current line from the display, if possi-
     ble.  If there is no character to erase, an implementation may echo an
     indication that this was the case or do nothing.

     If ECHOK and ICANON are set, the KILL character causes the current line
     to be discarded and the system echoes the `\n' character after the KILL
     character.

     If ECHOKE and ICANON are set, the KILL character causes the current line
     to be discarded and the system causes the terminal to erase the line from
     the display.

     If ECHOPRT and ICANON are set, the system assumes that the display is a
     printing device and prints a backslash and the erased characters when
     processing ERASE characters, followed by a forward slash.

     If ECHOCTL is set, the system echoes control characters in a visible
     fashion using a caret followed by the control character.

     If ALTWERASE is set, the system uses an alternative algorithm for deter-
     mining what constitutes a word when processing WERASE characters (see
     WERASE).

     If ECHONL and ICANON are set, the `\n' character echoes even if ECHO is
     not set.

     If ICANON is set, canonical processing is enabled.  This enables the
     erase and kill edit functions, and the assembly of input characters into
     lines delimited by NL, EOF, and EOL, as described in Canonical Mode Input
     Processing.

     If ICANON is not set, read requests are satisfied directly from the input
     queue.  A read is not satisfied until at least MIN bytes have been
     received or the timeout value TIME expired between bytes.	The time value
     represents tenths of seconds.  See Noncanonical Mode Input Processing for
     more details.

     If ISIG is set, each input character is checked against the special con-
     trol characters INTR, QUIT, and SUSP (job control only).  If an input
     character matches one of these control characters, the function associ-
     ated with that character is performed.  If ISIG is not set, no checking
     is done.  Thus these special input functions are possible only if ISIG is
     set.

     If IEXTEN is set, implementation-defined functions are recognized from

     If TOSTOP is set, the signal SIGTTOU is sent to the process group of a
     process that tries to write to its controlling terminal if it is not in
     the foreground process group for that terminal.  This signal, by default,
     stops the members of the process group.  Otherwise, the output generated
     by that process is output to the current output stream.  Processes that
     are blocking or ignoring SIGTTOU signals are excepted and allowed to pro-
     duce output and the SIGTTOU signal is not sent.

     If NOKERNINFO is set, the kernel does not produce a status message when
     processing STATUS characters (see STATUS).

   Special Control Characters
     The special control characters values are defined by the array c_cc.
     This table lists the array index, the corresponding special character,
     and the system default value.  For an accurate list of the system
     defaults, consult the header file <ttydefaults.h>.

	   Index Name	 Special Character    Default Value
	   VEOF 	 EOF		      ^D
	   VEOL 	 EOL		      _POSIX_VDISABLE
	   VEOL2	 EOL2		      _POSIX_VDISABLE
	   VERASE	 ERASE		      ^? `\177'
	   VWERASE	 WERASE 	      ^W
	   VKILL	 KILL		      ^U
	   VREPRINT	 REPRINT	      ^R
	   VINTR	 INTR		      ^C
	   VQUIT	 QUIT		      ^\\ `\34'
	   VSUSP	 SUSP		      ^Z
	   VDSUSP	 DSUSP		      ^Y
	   VSTART	 START		      ^Q
	   VSTOP	 STOP		      ^S
	   VLNEXT	 LNEXT		      ^V
	   VDISCARD	 DISCARD	      ^O
	   VMIN 	 ---		      1
	   VTIME	 ---		      0
	   VSTATUS	 STATUS 	      ^T

     If the value of one of the changeable special control characters (see
     Special Characters) is {_POSIX_VDISABLE}, that function is disabled; that
     is, no input data is recognized as the disabled special character.  If
     ICANON is not set, the value of {_POSIX_VDISABLE} has no special meaning
     for the VMIN and VTIME entries of the c_cc array.

     The initial values of the flags and control characters after open() is
     set according to the values in the header <sys/ttydefaults.h>.

FreeBSD 5.4			April 19, 1994			   FreeBSD 5.4

SPONSORED LINKS




Man(1) output converted with man2html , sed , awk