Open System Services System Calls Reference Manual (G06.25+, H06.03+)
tty(7) OSS System Calls Reference Manual
SIGTTOU signal, the writes to the terminal are allowed and the SIGTTOU signal is not sent. If
TOSTOP is set, if the writing process’s process group is orphaned, and if SIGTTOU is not
blocked by the writing process, the write operation returns the value -1 with errno set to [EIO]
and does not a send a signal.
The tty Parameters
In contrast to earlier versions of the tty driver, the OSS terminal parameters and structures are
contained in a single structure, which is the termios structure defined in the termios.h file.
Basic System Calls
A large number of system calls apply to terminals. The applicable calls follow:
tcgetattr() Gets the termios structure and all of its associated parameters. The interface
delays until output is quiescent, then throws away any unread characters.
tcsetattr(TCSANOW)
Immediately sets the parameters according to the termios structure.
tcsetattr(TCSADRAIN)
Waits until all output is transmitted and input is read before setting the parame-
ters according to the termios structure.
tcsetattr(TCSAFLUSH)
Waits until all output is transmitted before setting the parameters according to
the termios structure. Discards all unread input before setting the parameters.
tcflush() Flushes unread input data, nontransmitted output data, or both.
The following system calls perform miscellaneous functions on the controlling terminal. In cases
where arguments are required, they are described as a parameter named arg. Otherwise, arg
should be specified as the value 0 (zero).
tcflow(TCIOFF)
Output is stopped as if the STOP character were typed.
tcflow(TCION)
Output is restarted as if the START character were typed.
tcflow(TCOOFF)
Output is suspended.
tcflow(TCOON)
Suspended output is restarted.
tcgetpgrp() The arg parameter is a pointer to an int parameter into which is placed the pro-
cess group ID of the process group for which this terminal is the control terminal.
tcsetpgrp() The arg parameter is a pointer to an int parameter containing the value to which
the process group ID for this terminal will be set.
FILES
/dev/tty Special file for a tty device.
11−62 Hewlett-Packard Company 527186-003