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

t
termio(7) termio(7)
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.
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() func-
tion (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 cal-
ling 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 ).
HP-UX 11i Version 2: September 2004 17 Hewlett-Packard Company Section 7191