OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man4 / tty_ioctl.4
index ad65535..eebafc3 100644 (file)
@@ -5,7 +5,7 @@
 .\" Distributed under GPL
 .\" %%%LICENSE_END
 .\"
-.TH TTY_IOCTL 4 2008-10-29 "Linux" "Linux Programmer's Manual"
+.TH TTY_IOCTL 4 2013-11-12 "Linux" "Linux Programmer's Manual"
 .SH NAME
 tty_ioctl \- ioctls for terminals and serial lines
 .SH SYNOPSIS
@@ -90,9 +90,9 @@ structure of the terminal.
 Sets the locking status of the
 .I termios
 structure of the terminal.
-Only root (more precisely: a process with the
+Only a process with the
 .BR CAP_SYS_ADMIN
-capability) can do this.
+capability can do this.
 .SS Get and set window size
 Window sizes are kept in the kernel, but not used by the kernel
 (except in the case of virtual consoles, where the kernel will
@@ -223,9 +223,9 @@ to the given terminal.
 If that was a pseudoterminal 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;
-since version 2.6.10, only root (a process with the
+since version 2.6.10, only a process with the
 .BR CAP_SYS_ADMIN
-capability) may do this.
+capability may do this.
 If output was redirected already
 .B EBUSY
 is returned,
@@ -241,12 +241,16 @@ or
 Make the given terminal the controlling terminal of the calling process.
 The calling process must be a session leader and not have a
 controlling terminal already.
+For this case,
+.I arg
+should be specified as zero.
+
 If this terminal is already the controlling terminal
-of a different session group then the ioctl fails with
+of a different session group, then the ioctl fails with
 .BR EPERM ,
-unless the caller is root (more precisely: has the
+unless the caller has the
 .BR CAP_SYS_ADMIN
-capability) and
+capability and
 .I arg
 equals 1, in which case the terminal is stolen, and all processes that had
 it as controlling terminal lose it.
@@ -291,7 +295,7 @@ No further
 operations on the terminal are permitted.
 (They will fail with
 .BR EBUSY ,
-except for root, that is, a process with the
+except for a process with the
 .BR CAP_SYS_ADMIN
 capability.)
 .TP
@@ -437,7 +441,7 @@ corresponding to
 The
 .BR ioctl (2)
 system call returns 0 on success.
-On error it returns \-1 and sets
+On error, it returns \-1 and sets
 .I errno
 appropriately.
 .SH ERRORS
@@ -495,3 +499,11 @@ main(void)
 .\" TIOCSERGETMULTI            struct serial_multiport_struct *
 .\" TIOCSERSETMULTI            const struct serial_multiport_struct *
 .\" TIOCGSERIAL, TIOCSSERIAL (see above)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.