OSDN Git Service

(split) LDP v3.30, v3.31 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / man4 / tty.4
1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
2 .\"     Fri Apr  2 11:32:09 MET DST 1993
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, write to the Free
21 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
22 .\" USA.
23 .\"
24 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
25 .\" Modified 2003-04-07 by Michael Kerrisk
26 .\"
27 .\" Japanese Version Copyright (c) 1996,1997,1998 ISHIKAWA Mutsumi
28 .\"         all rights reserved.
29 .\" Translated Tue Feb 6 16:57:03 JST 1997
30 .\"         by ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
31 .\" Modified Thu Feb  5 17:28:31 JST 1998
32 .\"         by ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
33 .\" Updated Fri Aug 16 00:04:53 JST 2002
34 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .\"
36 .\" WORD:       terminal                Ã¼Ëö
37 .\" WORD:       process                 ¥×¥í¥»¥¹
38 .\" WORD:       controlling terminal    À©¸æüËö
39 .\" WORD:       file descriptor         ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
40 .\"
41 .TH TTY 4 2003-04-07 "Linux" "Linux Programmer's Manual"
42 .\"O .SH NAME
43 .\"O tty \- controlling terminal
44 .SH Ì¾Á°
45 tty \- À©¸æüËö
46 .\"O .SH DESCRIPTION
47 .SH ÀâÌÀ
48 .\"O The file \fI/dev/tty\fP is a character file with major number 5 and
49 .\"O minor number 0, usually of mode 0666 and owner.group root.tty.
50 .\"O It is a synonym for the controlling terminal of a process, if any.
51 \fI/dev/tty\fP ¥Õ¥¡¥¤¥ë¤Ï¡¢¥á¥¸¥ã¡¼ÈÖ¹æ 5¡¢¥Þ¥¤¥Ê¡¼ÈÖ¹æ 0 ¤Î¥­¥ã¥é¥¯¥¿¡¼
52 ¥Ç¥Ð¥¤¥¹¤Ç¤¢¤ë¡£Ä̾¤½¤Î¥â¡¼¥É¤Ï 0666¡¢¥ª¡¼¥Ê.¥°¥ë¡¼¥×¤Ï root.tty ¤È¤Ê¤Ã¤Æ¤¤¤ë¡£
53 ¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤¬Â¸ºß¤¹¤ë¾ì¹ç¡¢¤³¤Î¥Ç¥Ð¥¤¥¹¥Õ¥¡¥¤¥ë¤Ï¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤È
54 Ʊ¤¸¤â¤Î¤òɽ¤¹¡£
55 .LP
56 .\"O In addition to the
57 .\"O .BR ioctl (2)
58 .\"O requests supported by the device that
59 .\"O \fBtty\fP refers to, the
60 .\"O .BR ioctl (2)
61 .\"O request \fBTIOCNOTTY\fP is supported.
62 \fBtty\fP ¤¬»²¾È¤·¤Æ¤¤¤ë¥Ç¥Ð¥¤¥¹¤¬¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë
63 .BR ioctl (2)
64 Í×µá¤Ë
65 ²Ã¤¨¤Æ¡¢
66 .BR ioctl (2)
67 Í×µá \fBTIOCNOTTY\fP ¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
68 .SS TIOCNOTTY
69 .\"O Detach the calling process from its controlling terminal.
70 ¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ò¤½¤ÎÀ©¸æüËö¤«¤éÀÚ¤êÎ¥¤¹¡£
71 .sp
72 .\"O If the process is the session leader,
73 .\"O then
74 .\"O .B SIGHUP
75 .\"O and
76 .\"O .B SIGCONT
77 .\"O signals are sent to the foreground process group
78 .\"O and all processes in the current session lose their controlling tty.
79 ¤½¤Î¥×¥í¥»¥¹¤¬¥»¥Ã¥·¥ç¥ó¡¦¥ê¡¼¥À¡¼ (session leader) ¤Î¾ì¹ç¡¢
80 ¥·¥°¥Ê¥ë
81 .B SIGHUP
82 ¤È
83 .B SIGCONT
84 ¤¬¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤ËÁ÷¤é¤ì¡¢
85 ¥«¥ì¥ó¥È¡¦¥»¥Ã¥·¥ç¥ó¤Ë°¤¹Á´¤Æ¤Î¥×¥í¥»¥¹¤Ë¤Ä¤¤¤Æ³Æ¡¹¤ÎÀ©¸æüËö¤¬ÀÚ¤êÎ¥¤µ¤ì¤ë¡£
86 .sp
87 .\"O This
88 .\"O .BR ioctl (2)
89 .\"O call only works on file descriptors connected
90 .\"O to \fI/dev/tty\fP.
91 .\"O It is used by daemon processes when they are invoked
92 .\"O by a user at a terminal.
93 .\"O The process attempts to open \fI/dev/tty\fP.
94 .\"O If the open succeeds, it
95 .\"O detaches itself from the terminal by using \fBTIOCNOTTY\fP, while if the
96 .\"O open fails, it is obviously not attached to a terminal and does not need
97 .\"O to detach itself.
98 ¤³¤Î
99 .BR ioctl (2)
100 ¸Æ¤Ó½Ð¤·¤Ï \fI/dev/tty\fP ¤Ë·ë¤Ó¤Ä¤±¤é¤ì¤¿¥Õ¥¡¥¤¥ë¡¦
101 ¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ë¤Î¤ßºîÍѤ¹¤ë¡£¤³¤Îµ¡Ç½¤Ï¡¢¥æ¡¼¥¶¤Ë¤è¤Ã¤ÆüËö¤«¤é
102 µ¯Æ°¤µ¤ì¤¿¥Ç¡¼¥â¥ó¥×¥í¥»¥¹¤Ë¤è¤ê»ÈÍѤµ¤ì¤ë¡£
103 ¤½¤Î¥×¥í¥»¥¹¤Ï \fI/dev/tty\fP ¤ò¥ª¡¼¥×¥ó¤·¤è¤¦¤È»î¤ß¤ë¡£
104 ¥ª¡¼¥×¥ó¤ËÀ®¸ù¤¹¤ë¤È¡¢¤½¤Î¥×¥í¥»¥¹¤Ï \fBTIOCNOTTY\fP ¤ò»È¤Ã¤Æ
105 ¼«Ê¬¼«¿È¤òüËö¤«¤éÀÚ¤êÎ¥¤¹¡£¥ª¡¼¥×¥ó¤Ë¼ºÇÔ¤·¤¿¾ì¹ç¡¢¤½¤Î¥×¥í¥»¥¹¤¬
106 üËö¤Ë·ë¤Ó¤Ä¤±¤é¤ì¤Æ¤¤¤Ê¤¤¤Î¤ÏÌÀ¤é¤«¤Ç¤¢¤ê¡¢¼«¿È¤òüËö¤«¤éÀÚ¤êÎ¥¤¹
107 ɬÍפϤʤ¤¡£
108 .\"O .SH FILES
109 .SH ¥Õ¥¡¥¤¥ë
110 /dev/tty
111 .\"O .SH "SEE ALSO"
112 .SH ´ØÏ¢¹àÌÜ
113 .BR chown (1),
114 .BR mknod (1),
115 .BR ioctl (2),
116 .BR termios (3),
117 .BR console (4),
118 .BR tty_ioctl (4),
119 .BR ttyS (4),
120 .BR agetty (8),
121 .BR mingetty (8)