.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), .\" Fri Apr 2 11:32:09 MET DST 1993 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2003-04-07 by Michael Kerrisk .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH TTY 4 2003\-04\-07 Linux "Linux Programmer's Manual" .SH 名前 tty \- 制御端末 .SH 説明 \fI/dev/tty\fP ファイルは、メジャー番号 5、マイナー番号 0 のキャラクター デバイスである。通常、そのモードは 0666、オーナ.グループは root.tty となっている。 プロセスの制御端末が存在する場合、このデバイスファイルはプロセスの制御端末と 同じものを表す。 .LP \fBtty\fP が参照しているデバイスがサポートしている \fBioctl\fP(2) 要求に 加えて、 \fBioctl\fP(2) 要求 \fBTIOCNOTTY\fP がサポートされている。 .SS TIOCNOTTY 呼び出し元のプロセスをその制御端末から切り離す。 .sp そのプロセスがセッション・リーダー (session leader) の場合、 シグナル \fBSIGHUP\fP と \fBSIGCONT\fP がフォアグラウンド・プロセス・グループに送られ、 カレント・セッションに属す全てのプロセスについて各々の制御端末が切り離される。 .sp この \fBioctl\fP(2) 呼び出しは \fI/dev/tty\fP に結びつけられたファイル・ ディスクリプタにのみ作用する。この機能は、ユーザによって端末から 起動されたデーモンプロセスにより使用される。 そのプロセスは \fI/dev/tty\fP をオープンしようと試みる。 オープンに成功すると、そのプロセスは \fBTIOCNOTTY\fP を使って 自分自身を端末から切り離す。オープンに失敗した場合、そのプロセスが 端末に結びつけられていないのは明らかであり、自身を端末から切り離す 必要はない。 .SH ファイル /dev/tty .SH 関連項目 \fBchown\fP(1), \fBmknod\fP(1), \fBioctl\fP(2), \fBtermios\fP(3), \fBconsole\fP(4), \fBtty_ioctl\fP(4), \fBttyS\fP(4), \fBagetty\fP(8), \fBmingetty\fP(8) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。