tty_ioctl.4: wfix: s/tty/terminal/

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-10-16 17:38:08 +02:00
parent bf70773447
commit 132249c496
1 changed files with 20 additions and 19 deletions

View File

@ -70,7 +70,7 @@ instead of a
.SS "Locking the termios structure"
The
.I termios
structure of a tty can be locked.
structure of a terminal can be locked.
The lock is itself a
.I termios
structure, with non-zero bits or fields indicating a
@ -214,7 +214,7 @@ Redirect output that would have gone to
.I /dev/console
or
.I /dev/tty0
to the given tty.
to the given terminal.
If that was a pseudo-terminal master, send it to the slave.
In Linux before version 2.6.10,
anybody can do this as long as the output was not redirected yet;
@ -230,56 +230,57 @@ pointing at
.I /dev/console
or
.IR /dev/tty0 .
.SS "Controlling tty"
.SS "Controlling terminal"
.TP
.BI "TIOCSCTTY int " arg
Make the given tty the controlling tty of the calling process.
Make the given terminal the controlling terminal of the calling process.
The calling process must be a session leader and not have a
controlling tty already.
If this tty is already the controlling tty
controlling terminal already.
If this terminal is already the controlling terminal
of a different session group then the ioctl fails with
.BR EPERM ,
unless the caller is root (more precisely: has the
.BR CAP_SYS_ADMIN
capability) and
.I arg
equals 1, in which case the tty is stolen, and all processes that had
it as controlling tty lose it.
equals 1, in which case the terminal is stolen, and all processes that had
it as controlling terminal lose it.
.TP
.B TIOCNOTTY void
If the given tty was the controlling tty of the calling process,
give up this controlling tty.
If the given terminal was the controlling terminal of the calling process,
give up this controlling terminal.
If the process was session leader,
then send
.B SIGHUP
and
.B SIGCONT
to the foreground process group
and all processes in the current session lose their controlling tty.
and all processes in the current session lose their controlling terminal.
.SS "Process group and session ID"
.TP
.BI "TIOCGPGRP pid_t *" argp
When successful, equivalent to
.IR "*argp = tcgetpgrp(fd)" .
.br
Get the process group ID of the foreground process group on this tty.
Get the process group ID of the foreground process group on this terminal.
.TP
.BI "TIOCSPGRP const pid_t *" argp
Equivalent to
.IR "tcsetpgrp(fd, *argp)" .
.br
Set the foreground process group ID of this tty.
Set the foreground process group ID of this terminal.
.TP
.BI "TIOCGSID pid_t *" argp
Get the session ID of the given tty.
Get the session ID of the given terminal.
This will fail with
.B ENOTTY
in case the tty is not a master pseudo-terminal and not our controlling tty.
in case the terminal is not a master pseudo-terminal
and not our controlling terminal.
Strange.
.SS "Exclusive mode"
.TP
.B "TIOCEXCL void"
Put the tty into exclusive mode.
Put the terminal into exclusive mode.
No further
.BR open (2)
operations on the terminal are permitted.
@ -294,10 +295,10 @@ Disable exclusive mode.
.SS "Line discipline"
.TP
.BI "TIOCGETD int *" argp
Get the line discipline of the tty.
Get the line discipline of the terminal.
.TP
.BI "TIOCSETD const int *" argp
Set the line discipline of the tty.
Set the line discipline of the terminal.
.SS "Pseudo-terminal ioctls"
.TP
.BI "TIOCPKT const int *" argp
@ -395,7 +396,7 @@ If the
flag for a line is off, the hardware carrier detect (DCD)
signal is significant, and an
.BR open (2)
of the corresponding tty will block until DCD is asserted,
of the corresponding terminal will block until DCD is asserted,
unless the
.B O_NONBLOCK
flag is given.