tcsetattr(3) CLIX tcsetattr(3)
NAME
tcsetattr - Sets the parameters associated with the terminal
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <termios.h>
int tcsetattr(
int file_des ,
int optional_actions ,
struct termios *termios_p );
PARAMETERS
file_des
Specifies an open file descriptor associated with a terminal.
termios_p
Points to the termios structure.
optional_actions
Specifies options available for setting terminal attributes.
DESCRIPTION
The tcsetattr() function sets the parameters associated with the terminal
referred to by the open file descriptor from the termios structure
referenced by termios_p, as follows:
⊕ If optional_actions is TCSANOW, the change will occur immediately.
⊕ If optional_actions is TCSADRAIN, the change will occur after all
output written to file_des has been transmitted. This function should
be used when changing parameters that affect output.
⊕ If optional_actions is TCSAFLUSH, the change will occur after all
output written to file_des has been transmitted, and all input received
but not read will be discarded before the change is made.
RETURN VALUE
Upon successful completion, 0 is returned. Otherwise, -1 is returned and
the global variable errno is set to indicate the error.
ERRORS
2/94 - Intergraph Corporation 1
tcsetattr(3) CLIX tcsetattr(3)
The tcsetattr() function will fail if any of the following are true:
[EBADF] The file_des parameter is not a valid file descriptor.
[EINVAL] The optional_actions parameter is not a proper value, or an
attempt was made to change an attribute represented in the
termios structure to an unsupported value.
[ENOTTY] The file associated with file_des is not a terminal.
[EFAULT] The termios_p parameter is an invalid address.
RELATED INFORMATION
Functions: cfgetispeed(3), tcgetattr(3)
2 Intergraph Corporation - 2/94