OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / getttyent.3
1 .\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"  Distributed under GPL
3 .\"
4 .\"*******************************************************************
5 .\"
6 .\" This file was generated with po4a. Translate the source file.
7 .\"
8 .\"*******************************************************************
9 .TH GETTTYENT 3 2002\-07\-18 GNU "Linux Programmer's Manual"
10 .SH 名前
11 getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリを取得する
12 .SH 書式
13 \fB#include <ttyent.h>\fP
14 .sp
15 \fBstruct ttyent *getttyent(void);\fP
16 .sp
17 \fBstruct ttyent *getttynam(const char *\fP\fIname\fP\fB);\fP
18 .sp
19 \fBint setttyent(void);\fP
20 .sp
21 \fBint endttyent(void);\fP
22 .SH 説明
23 これらの関数はファイル \fB_PATH_TTYS\fP (例えば \fI/etc/ttys\fP)  へのインタフェースを提供する。
24
25 関数 \fBsetttyent\fP()  はファイルをオープンする。 また既にオープンされている場合は、巻き戻す。
26
27 関数 \fBendttyent\fP()  はファイルをクローズする。
28
29 関数 \fBgetttynam\fP()  は指定された端末名についてファイルを検索する。 この関数は (以下で説明されている)  \fIttyent\fP
30 構造体へのポインタを返す。
31
32 関数 \fBgetttyent\fP()  は (もし必要であれば) ファイル \fB_PATH_TTYS\fP をオープンし、最初のエントリを返す。
33 ファイルが既にオープンされている場合は、次のエントリを返す。 \fIttyent\fP 構造体は以下の通りである。
34 .in +4n
35 .nf
36
37 struct ttyent {
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;  /* コメントフィールド */
44 };
45 .fi
46 .in
47
48 \fIty_status\fP は以下のいずれか値をとることができる。
49 .br
50 .nf
51
52 #define TTY_ON     0x01  /* ログインを有効にする (ty_getty プログラムを開始する) */
53 #define TTY_SECURE 0x02  /* ユーザ ID 0 でのログインを許可する */
54 .fi
55 .SH 準拠
56 POSIX.1\-2001 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。
57 .SH 注意
58 Linux では、ファイル \fI/etc/ttys\fP と上で説明した関数は使われていない。
59 .SH 関連項目
60 \fBttyname\fP(3), \fBttyslot\fP(3)