1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
4 .\"*******************************************************************
6 .\" This file was generated with po4a. Translate the source file.
8 .\"*******************************************************************
9 .TH GETTTYENT 3 2002\-07\-18 GNU "Linux Programmer's Manual"
11 getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリを取得する
13 \fB#include <ttyent.h>\fP
15 \fBstruct ttyent *getttyent(void);\fP
17 \fBstruct ttyent *getttynam(const char *\fP\fIname\fP\fB);\fP
19 \fBint setttyent(void);\fP
21 \fBint endttyent(void);\fP
23 これらの関数はファイル \fB_PATH_TTYS\fP (例えば \fI/etc/ttys\fP) へのインタフェースを提供する。
25 関数 \fBsetttyent\fP() はファイルをオープンする。 また既にオープンされている場合は、巻き戻す。
27 関数 \fBendttyent\fP() はファイルをクローズする。
29 関数 \fBgetttynam\fP() は指定された端末名についてファイルを検索する。 この関数は (以下で説明されている) \fIttyent\fP
32 関数 \fBgetttyent\fP() は (もし必要であれば) ファイル \fB_PATH_TTYS\fP をオープンし、最初のエントリを返す。
33 ファイルが既にオープンされている場合は、次のエントリを返す。 \fIttyent\fP 構造体は以下の通りである。
38 char *ty_name; /* 端末デバイス名 */
39 char *ty_getty; /* 実行するコマンド。通常は getty */
40 char *ty_type; /* termcap のための端末タイプ */
41 int ty_status; /* 状態フラグ */
42 char *ty_window; /* ウィンドウマネージャを起動するコマンド */
43 char *ty_comment; /* コメントフィールド */
48 \fIty_status\fP は以下のいずれか値をとることができる。
52 #define TTY_ON 0x01 /* ログインを有効にする (ty_getty プログラムを開始する) */
53 #define TTY_SECURE 0x02 /* ユーザ ID 0 でのログインを許可する */
56 POSIX.1\-2001 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。
58 Linux では、ファイル \fI/etc/ttys\fP と上で説明した関数は使われていない。
60 \fBttyname\fP(3), \fBttyslot\fP(3)