X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=release%2Fman3%2Fttyslot.3;h=021e57bad1157cf5422955136c2f69008fd070f5;hp=831e53ec1531294f77677f7450c79566a68222ac;hb=bb92023e2caf6dc30bd3a8f07877ec870c853e23;hpb=f5d1a45c05af679fb80706c40816f4ec5152926e diff --git a/release/man3/ttyslot.3 b/release/man3/ttyslot.3 index 831e53ec..021e57ba 100644 --- a/release/man3/ttyslot.3 +++ b/release/man3/ttyslot.3 @@ -1,5 +1,6 @@ .\" Copyright (C) 2002 Andries Brouwer .\" +.\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. @@ -19,6 +20,7 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END .\" .\" This replaces an earlier man page written by Walter Harms .\" . @@ -54,7 +56,7 @@ _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_\ <\ 500\ &&\ _XOPEN_SOURCE_EXTENDED レガシーな関数 \fBttyslot\fP() は、あるファイルに書かれているカレントユーザのエントリのインデックスを返す。 .LP 「どのファイルなのか?」という質問があるだろう。 では、まず最初にその歴史を見てみよう。 -.SS 大昔の歴史 +.SS "Ancient history" UNIX V6 では \fI/etc/ttys\fP ファイルが使われていた。 \fBinit\fP(8) プログラムは、このファイルを読み込み、 各端末行で何をすべきかを探す。 各行は 3 文字から構成されている。 1 文字目は \(aq0\(aq または \(aq1\(aq であり、 \(aq0\(aq は「無視する」ことを表す。 2 文字目は端末を示す: \(aq8\(aq は "/dev/tty8" を表す。 3 文字目は @@ -67,7 +69,7 @@ UNIX V7 ではフォーマットが変更された: 2 文字目が \fBgetty\fP(8 を表す)、 行の残り (の文字) は端末名となった。 よって、一般的な行は "14console" となる。 .LP 後者のシステムの書式は、より精巧である。 System V 系のシステムでは、代わりに \fI/etc/inittab\fP がある。 -.SS "大昔の歴史 (2)" +.SS "Ancient history (2)" 一方、現在ログインしている人をリストするファイル \fI/etc/utmp\fP がある。 これは \fBlogin\fP(1) によって管理されている。 このファイルは固定されたサイズであり、ファイル内の適切なインデックスは、 \fBlogin\fP(1) によって決定される。 この際に \fBttyslot\fP() が呼ばれて、 \fI/etc/ttys\fP における行番号を見つける (行番号は 1 から数える)。 @@ -98,6 +100,6 @@ Minix には \fIfttyslot\fP(\fIfd\fP) もある。 .SH 関連項目 \fBgetttyent\fP(3), \fBttyname\fP(3), \fButmp\fP(5) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。