HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
t
termio(7) termio(7)
TIOCSPGRP Sets the foreground process group associated with the terminal to the value refer-
enced by arg. This feature is easily implemented using the
tcsetpgrp() function
(see tcsetpgrp(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.
[EINVAL] The process ID referenced by arg is not a supported value.
[ENOTTY] The calling process does not have a controlling terminal, or the fildes
is not the controlling terminal, or the controlling terminal is no longer
associated with the session of the calling process.
[EPERM] The process ID referenced by arg is a supported value but does not
match the process group ID of a process in the same session as the
calling process.
TIOCGSID Returns in the integer referenced by arg the session ID of the terminal specified by
fildes. This feature is easily implemented using the
tcgetsid() function (see
tcgetsid(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 device associated with fildes is not a terminal.
[EACCES] The fildes is a terminal that is not allocated to a session.
TIOCLGET Get the process group control mode word and store it in the int referenced by arg.
This command is allowed from a background process; however, the information may
be subsequently changed by a foreground process.
TIOCLSET Set the process group control mode word to the value of the int referenced by arg.
TIOCLBIS Use the int referenced by arg as a mask of bits to set in the process group control
mode word.
TIOCLBIC Use the int referenced by arg as a mask of bits to clear in the process group control
mode word.
The following bit is defined in the process group control mode word:
LTOSTOP Send SIGTTOU for background writes.
Setting or clearing LTOSTOP is equivalent to setting or clearing the TOSTOP flag (see Local Modes). If
LTOSTOP is set and a process is not in the foreground process group of its controlling terminal, a write by
the process to its controlling terminal may be denied (see Terminal Access Control).
Terminal Size IOCTL Commands
The following
ioctl() system calls are used to get and set terminal size information for the terminal
referenced by fildes. These ioctl() system calls use the winsize structure to get and set the termi-
nal size information. The winsize structure, defined in <termios.h> , has the following members :
unsigned short ws_row; /* Rows, in characters */
unsigned short ws_col; /* Columns, in characters */
unsigned short ws_xpixel; /* Horizontal size, in pixels */
unsigned short ws_ypixel; /* Vertical size, in pixels */
The initial values for all elements of terminal size are zero. The values for terminal size are neither set nor
used by the general terminal interface, and have no effect on the functionality of the general terminal inter-
face. The values for terminal size are set and used only by applications that access them through the
terminal-size ioctl() system calls (see ioctl(2)).
ioctl() system calls that use the above structure have the form:
ioctl (fildes, command, arg)
struct winsize *arg;
208 Hewlett-Packard Company − 17 − HP-UX 11i Version 2: December 2007 Update