COHERENT manpages
This page displays the COHERENT manpage for tcsetattr() [Set terminal attributes].
List of available manpages
Index
tcsetattr() -- termios Macro (termios.h)
Set terminal attributes
#include <termios.h>
int tcsetattr(fd, optional_actions, termios_p)
int fd, optional_actions;
struct termios *termios_p;
The termios macro tcsetattr() sets the attributes of the terminal device
described by file descriptor fd to those stored in the termios structure to
which termios_p points.
option_actions defines the manner in which the attributes are set, as
follows:
TCSANOW
The attributes are set immediately.
TCSADRAIN
The attributes are set after all data that has been sent to fd has
been written. Use this when changing parameters that affect output.
TCSAFLUSH
The change occurs after all output send to fd has been written: all
input received but not read is discarded.
These constants are defined in header file <termios.h>.
If all goes well, tcsetattr() returns zero. If something goes wrong, it
returns -1 and sets errno
EBADF
fd is not a valid file descriptor.
EINVAL
optional_actions is not a proper value, or an attempt was made to
change an attribute in the termios structure to an unsupported value.
ENOTTY
fd does not describe a terminal.
See Also
termios
POSIX Standard, §7.2.1