Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
tcgetattr - get parameters associated with terminal
&pagelevel(4)&pagelevel
Syntax | #include <termios.h> int tcgetattr(int fildes, struct termios *termios_p); |
Description | tcgetattr() reads the parameters of the terminal associated with fildes and writes them into the termios structure pointed to by termios_p.
fildes is a file descriptor associated with a terminal. termios_p is a pointer to a termios structure. tcgetattr() may be executed from any process.
tcgetattr() can be called from a background process, and the terminal attributes can then be modified from a foreground process.
Extension The output baud rate always corresponds to the input baud rate and is equal to 38400 (see tcsetattr() for details). (End) If the terminal device does not support split baud rates, the input baud rate stored in the termios structure will be 0. |
Return val. | 0 -1 | if successful. if an error occurs. errno is set to indicate the error. |
Errors | tcgetattr() will fail if:
|
| EBADF
| fildes is not a valid file descriptor. |
| Extension |
| EINVAL
| An attempt was made to access a BS2000 file. (End) |
| ENOTTY
| The file associated with fildes is not a terminal. |
See also | tcsetattr() , termios.h , section “General terminal interface”.
|