1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
7 .\"*******************************************************************
9 .\" This file was generated with po4a. Translate the source file.
11 .\"*******************************************************************
12 .TH GETTTYENT 3 2013\-07\-22 GNU "Linux Programmer's Manual"
14 getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリを取得する
16 \fB#include <ttyent.h>\fP
18 \fBstruct ttyent *getttyent(void);\fP
20 \fBstruct ttyent *getttynam(const char *\fP\fIname\fP\fB);\fP
22 \fBint setttyent(void);\fP
24 \fBint endttyent(void);\fP
26 これらの関数はファイル \fB_PATH_TTYS\fP (例えば \fI/etc/ttys\fP) へのインタフェースを提供する。
28 関数 \fBsetttyent\fP() はファイルをオープンする。 また既にオープンされている場合は、巻き戻す。
30 関数 \fBendttyent\fP() はファイルをクローズする。
32 関数 \fBgetttynam\fP() は指定された端末名についてファイルを検索する。 この関数は (以下で説明されている) \fIttyent\fP
35 関数 \fBgetttyent\fP() は (もし必要であれば) ファイル \fB_PATH_TTYS\fP をオープンし、最初のエントリを返す。
36 ファイルが既にオープンされている場合は、次のエントリを返す。 \fIttyent\fP 構造体は以下の通りである。
41 char *ty_name; /* 端末デバイス名 */
42 char *ty_getty; /* 実行するコマンド。通常は getty */
43 char *ty_type; /* termcap のための端末タイプ */
44 int ty_status; /* 状態フラグ */
45 char *ty_window; /* ウィンドウマネージャを起動するコマンド */
46 char *ty_comment; /* コメントフィールド */
51 \fIty_status\fP は以下のいずれか値をとることができる。
55 #define TTY_ON 0x01 /* ログインを有効にする (ty_getty プログラムを開始する) */
56 #define TTY_SECURE 0x02 /* ユーザ ID 0 でのログインを許可する */
59 .SS "マルチスレッディング (pthreads(7) 参照)"
60 The \fBgetttyent\fP() function returns a pointer to a static variable, so it
63 The \fBsetttyent\fP() and \fBendttyent\fP() functions use a static variable, so
64 they are not thread\-safe.
66 The \fBgetttynam\fP() function calls thread\-unsafe function \fBgetttyent\fP() so
67 it is not thread\-safe.
69 POSIX.1\-2001 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。
71 Linux では、ファイル \fI/etc/ttys\fP と上で説明した関数は使われていない。
73 \fBttyname\fP(3), \fBttyslot\fP(3)
75 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
76 である。プロジェクトの説明とバグ報告に関する情報は
77 http://www.kernel.org/doc/man\-pages/ に書かれている。