termio.7 (2010 09)

t
termio(7) termio(7)
• If there is no space in the buffer, the write returns −1 with
errno set to
[EWOULDBLOCK].
To prohibit
FIOSNBIO-style non-blocking I/O from interfering with the
O_NONBLOCK and O_NDELAY flags (see open (2) and fcntl (2)), the functionality of
O_NONBLOCK and O_NDELAY always supersedes the functionality of
FIOSNBIO-style non-blocking I/O. This means that if either
O_NONBLOCK or
O_NDELAY is set, the driver performs read requests in accordance with the
definition of O_NDELAY or O_NONBLOCK.
When both O_NONBLOCK and
O_NDELAY are clear, the definition of
FIOSNBIO-style non-blocking I/O applies.
The default on open of a terminal device file is that
FIOSNBIO-style non-blocking
I/O is disabled.
FIOGSNBIO The integer referenced by arg is set to 1, if
FIOSNBIO-style non-blocking I/O is
enabled. Otherwise, the integer referenced by arg is set to 0.
Process Group Control IOCTL Commands
The process group control features described here (except for setting and getting the delayed stop process
character) are easily implemented using the functions
tcgetattr()
, tcsetattr(), tcgetpgrp(),
tcsetpgrp(), and tcsetsid(), (see tcattribute (3C), tcgetpgrp (3C), tcsetpgrp (3C), and tcgetsid (3C)
respectively).
The following structure, used with process group control, is defined in
<bsdtty.h>:
struct ltchars {
unsigned char t_suspc; /* stop process character*/
unsigned char t_dsuspc; /* delayed stop process character*/
unsigned char t_rprntc; /* reserved; must be ’_POSIX_VDISABLE’*/
unsigned char t_flushc; /* reserved; must be ’_POSIX_VDISABLE’*/
unsigned char t_werasc; /* reserved; must be ’_POSIX_VDISABLE’*/
unsigned char t_lnextc; /* reserved; must be ’_POSIX_VDISABLE’*/
};
The initial value for all these characters is
_POSIX_VDISABLE
, which causes them to be disabled. The
meaning for each character is as follows:
t_suspc Suspend the foreground process group. A suspend signal (SIGTSTP) is sent to all
processes in the foreground process group. Normally, each process is forced to stop,
but arrangements can be made to either ignore or block the signal, or to receive a
trap to an agreed-upon location; see signal(2) and signal (5). When enabled, the
typical value for this character is Control-Z or ASCII SUB. Setting or getting
t_suspc is equivalent to setting or getting the SUSP special control character.
t_dsuspc Same as t_suspc, except that the suspend signal (SIGTSTP) is sent when a process
reads the character, rather than when the character is typed. When enabled, the
typical value for this character is Control-Y or ASCII EM.
Attempts to set any of the reserved characters to a value other than
_POSIX_VDISABLE cause
ioctl() to return −1 with errno set to [EINVAL] with no change in value of the reserved character.
ioctl() system calls that use the above structure have the form:
ioctl (fildes, command, arg)
struct ltchars *arg;
Commands using this form are:
TIOCGLTC Get the process group control characters and store them in the ltchars structure
referenced by arg . This command is allowed from a background process. However,
the information may be subsequently changed by a foreground process.
TIOCSLTC Set the process group control characters from the structure referenced by arg.
Additional process group control
ioctl() system calls have the form:
ioctl (fildes, command, arg)
unsigned int *arg;
Commands using this form are:
16 Hewlett-Packard Company − 16 − HP-UX 11i Version 3: September 2010