Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tcgetattr(3P) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cfgetospeed(3P)

termios(7P)




tcgetattr(3P) tcgetattr(3P)
NAME tcgetattr, tcsetattr - get and set the terminal state SYNOPSIS #include <termios.h> int tcgetattr(fildes, termios-p) int fildes; struct termio *termio-p; int tcsetattr(fildes, optional-actions, termio-p) int fildes, optional-actions; struct termio *termio-p; DESCRIPTION tcgetattr retrieves the parameters associated with the device indicated by fildes and stores them in the termios structure indicated by termios-p. tcsetattr sets the parameters associated with the terminal using the information in the termios structure pointed to by termios-p. The action taken is dependent on the value of optional-actions. If optional-actions is TCSANOW, the change occurs immediately. If optional-actions is TCSADRAIN, the change occurs after all output written to fildes has been transmitted. TCSADRAIN should be used when changing parameters that affect output. If optional-actions is TCSAFLUSH, the change occurs after all output written to the object indicated by fildes has been transmitted; all input that has been received but not read is discarded before the change is made. tcgettattr is allowed from a background process; however, the terminal attributes may be changed later by a foreground process. STATUS MESSAGES AND VALUES On successful completion, a value of 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. If any of the following conditions occur, tcgetattr and tcsetattr return -1 and set errno to the corresponding value: EBADF The file descriptor fildes is not valid. EINVAL The device does not support the function called, or if the function called was tcsetattr, optional-actions is an invalid value. January 1992 1



tcgetattr(3P) tcgetattr(3P)
ENOTTY The file associated with fildes is not a terminal. SEE ALSO cfgetospeed(3P) termios(7P) in A/UX System Administrator's Reference 2 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026