HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

t
termio(7) termio(7)
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 Ctrl-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 typ-
ical value for this character is Ctrl-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 refer-
enced 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:
TIOCGPGRP Returns in the integer referenced by arg the foreground process group associated with
the terminal. This command is allowed from a background process. However, the
information may be subsequently changed by a foreground process. This feature is
easily implemented using the tcgetpgrp() function (see tcgetpgrp(3C)).
If the ioctl() call fails, it returns -1 and sets errno to one of the following
values:
[EBADF] fildes is not a valid file descriptor.
[ENOTTY] The file associated with fildes is not the controlling terminal, or the
calling process does not have a controlling terminal.
[EACCES] The file associated with fildes is the controlling terminal of the calling
process, however, there is no foreground process group defined for the
controlling terminal.
Note: [EACCES] may not be returned in future releases. Behavior in
cases where no foreground process group is defined for the controlling
terminal may change in future versions of the POSIX standard. Port-
able applications, therefore, should not rely on this error condition.
HP-UX 11i Version 2: December 2007 Update 16 Hewlett-Packard Company 207