TCGETATTR man page on NeXTSTEP

Man page or keyword search:  
man Server   1419 pages
apropos Keyword Search (all sections)
Output format
NeXTSTEP logo
[printable version]


TCGETATTR(3P)							 TCGETATTR(3P)

NAME
       tcgetattr, tcsetattr - get and set terminal attributes

SYNOPSIS
       #include <termios.h>

       int tcgetattr(int fildes, struct termios *termios_p);

       int   tcsetattr(int   fildes,   int   actions,	const  struct  termios
       *termios_p);

DESCRIPTION
       The tcgetattr function gets the	parameters  associated	with  an  open
       terminal	 file,	passed	through	 the  fildes  argument.	 It stores the
       parameters in the termios structure passed  through  the	 argument  tp.
       This  function  may  be	called from a background process; however, the
       terminal	 attributes  may  be  subsequently  changed  by	 a  foreground
       process.

       The tcsetattr function sets the parameters associated with the terminal
       to those	 in  the  termios  structure  referenced  by  termios_p.   The
       possible	 values	 of  the  actions argument are the following constants
       defined in <termios.h>:

       Constant		 Description

       TCSANOW		 Set the terminal attributes immediately.

       TCSADRAIN	 Set the terminal attributes after all output that has
			 already been written to fildes has been transmitted.

       TCSAFLUSH	 Set the terminal attributes after all output that has
			 already been written to fildes has been  transmitted.
			 Discard  all  input  that  has	 not  been read before
			 setting the attributes.

       A process that is not in	 the  foreground  process  group  cannot  call
       tcsetattr for its controlling terminal.

       The tcsetattr function returns success if it was able to perform any of
       the requested actions, even if some of the requested actions could  not
       be performed.

RETURN VALUE
       Upon  successful	 completion  tcgetattr and tcsetattr return a value of
       zero.  Otherwise, a value of  -1	 is  returned  and  errno  is  set  to
       indicate the error.

ERRORS
       Tcgetattr   and	tcsetattr  shall  return  -1  and  set	errno  to  the
       corresponding value:

       [EBADF]	      The fildes argument is not a valid file descriptor.

       [ENOTTY]	      The file associated with fildes is not a terminal.

       The following errors may be associated with tcsetattr:

       [EINTR]	      A signal interrupted the tcsetattr function.

       [EINVAL]	      The value of the pgrp_id argument is not valid.

SEE ALSO
       termios(4P)

4th Berkeley Distribution	August 1, 1992			 TCGETATTR(3P)
[top]

List of man pages available for NeXTSTEP

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net