OSDN Git Service

04e2896a50a627d222374a000b3ae6d4d5f4b50b
[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)