OSDN Git Service

ba948ced5d0abbb301414fc9ded28ba94577c922
[linuxjm/LDP_man-pages.git] / draft / man3 / getttyent.3
1 .\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
5 .\" %%%LICENSE_END
6 .\"
7 .\"*******************************************************************
8 .\"
9 .\" This file was generated with po4a. Translate the source file.
10 .\"
11 .\"*******************************************************************
12 .TH GETTTYENT 3 2013\-07\-22 GNU "Linux Programmer's Manual"
13 .SH 名前
14 getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリを取得する
15 .SH 書式
16 \fB#include <ttyent.h>\fP
17 .sp
18 \fBstruct ttyent *getttyent(void);\fP
19 .sp
20 \fBstruct ttyent *getttynam(const char *\fP\fIname\fP\fB);\fP
21 .sp
22 \fBint setttyent(void);\fP
23 .sp
24 \fBint endttyent(void);\fP
25 .SH 説明
26 これらの関数はファイル \fB_PATH_TTYS\fP (例えば \fI/etc/ttys\fP)  へのインタフェースを提供する。
27
28 関数 \fBsetttyent\fP()  はファイルをオープンする。 また既にオープンされている場合は、巻き戻す。
29
30 関数 \fBendttyent\fP()  はファイルをクローズする。
31
32 関数 \fBgetttynam\fP()  は指定された端末名についてファイルを検索する。 この関数は (以下で説明されている)  \fIttyent\fP
33 構造体へのポインタを返す。
34
35 関数 \fBgetttyent\fP()  は (もし必要であれば) ファイル \fB_PATH_TTYS\fP をオープンし、最初のエントリを返す。
36 ファイルが既にオープンされている場合は、次のエントリを返す。 \fIttyent\fP 構造体は以下の通りである。
37 .in +4n
38 .nf
39
40 struct ttyent {
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;  /* コメントフィールド */
47 };
48 .fi
49 .in
50
51 \fIty_status\fP は以下のいずれか値をとることができる。
52 .br
53 .nf
54
55 #define TTY_ON     0x01  /* ログインを有効にする (ty_getty プログラムを開始する) */
56 #define TTY_SECURE 0x02  /* ユーザ ID 0 でのログインを許可する */
57 .fi
58 .SH 属性
59 .SS "マルチスレッディング (pthreads(7) 参照)"
60 The \fBgetttyent\fP()  function returns a pointer to a static variable, so it
61 is not thread\-safe.
62 .LP
63 The \fBsetttyent\fP()  and \fBendttyent\fP()  functions use a static variable, so
64 they are not thread\-safe.
65 .LP
66 The \fBgetttynam\fP()  function calls thread\-unsafe function \fBgetttyent\fP()  so
67 it is not thread\-safe.
68 .SH 準拠
69 POSIX.1\-2001 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。
70 .SH 注意
71 Linux では、ファイル \fI/etc/ttys\fP と上で説明した関数は使われていない。
72 .SH 関連項目
73 \fBttyname\fP(3), \fBttyslot\fP(3)
74 .SH この文書について
75 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
76 である。プロジェクトの説明とバグ報告に関する情報は
77 http://www.kernel.org/doc/man\-pages/ に書かれている。