Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (t - v) tcsetattr(3)
NAME
tcsetattr - Sets the attributes associated with a terminal
LIBRARY
G-series native OSS processes: system library
H-series and J-series OSS processes: implicit libraries
SYNOPSIS
#include <termios.h>
int tcsetattr(
int filedes,
int optional_actions,
const struct termios *termios_p);
PARAMETERS
filedes Specifies an open file descriptor associated with a terminal.
optional_actions
Specifies options defining how the attributes will be set.
termios_p Points to a termios structure containing the values of the terminal attributes.
DESCRIPTION
The tcsetattr( ) function sets the attributes associated with the terminal referred to by the open
file descriptor in the filedes parameter from the values in the termios structure pointed to by the
termios_p parameter as follows:
• If the optional_actions parameter has the value TCSANOW, the change occurs immedi-
ately.
• If the optional_actions parameter has the value TCSADRAIN, the change occurs after
all output written to filedes has been transmitted. This function should be used when
changing attributes that affect output.
• If the optional_actions parameter has the value TCSAFLUSH, the change occurs after
all output written to filedes has been transmitted. All input that has been received but not
read is discarded before the change is made.
Attempts to use the tcsetattr( ) function from a process that is a member of a background process
group on a filedes associated with its controlling terminal causes the process group to be sent a
SIGTTOU signal. If the calling process is blocking or ignoring SIGTTOU signals, the process
is allowed to perform the operation and no signal is sent.
The termios structure can contain baud rate information as follows:
• If the terminal device supports input and output baud rates, then those fields in the ter-
mios structure should both contain rate values, even when the rates are equal.
• If the terminal device does not support differing baud rates, the value used in the output
baud rate field should be consistent with those allowed for the cfsetospeed() function
call.
• If the device does not support split baud rates, the input baud rate stored in the termios
structure should be 0 (zero).
The terminal interface supported for OSS access is a network virtual terminal implementation.
Any specified baud rate is therefore ignored.
527187-017 Hewlett-Packard Company 7−21