File: getttyent.3

package info (click to toggle)
manpages-ja 0.5.0.0.20120606-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 25,964 kB
  • sloc: perl: 161; makefile: 116
file content (64 lines) | stat: -rw-r--r-- 2,754 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
.\"  Distributed under GPL
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH GETTTYENT 3 2002\-07\-18 GNU "Linux Programmer's Manual"
.SH 名前
getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリを取得する
.SH 書式
\fB#include <ttyent.h>\fP
.sp
\fBstruct ttyent *getttyent(void);\fP
.sp
\fBstruct ttyent *getttynam(const char *\fP\fIname\fP\fB);\fP
.sp
\fBint setttyent(void);\fP
.sp
\fBint endttyent(void);\fP
.SH 説明
これらの関数はファイル \fB_PATH_TTYS\fP (例えば \fI/etc/ttys\fP)  へのインタフェースを提供する。

関数 \fBsetttyent\fP()  はファイルをオープンする。 また既にオープンされている場合は、巻き戻す。

関数 \fBendttyent\fP()  はファイルをクローズする。

関数 \fBgetttynam\fP()  は指定された端末名についてファイルを検索する。 この関数は (以下で説明されている)  \fIttyent\fP
構造体へのポインタを返す。

関数 \fBgetttyent\fP()  は (もし必要であれば) ファイル \fB_PATH_TTYS\fP をオープンし、最初のエントリを返す。
ファイルが既にオープンされている場合は、次のエントリを返す。 \fIttyent\fP 構造体は以下の通りである。
.in +4n
.nf

struct ttyent {
    char *ty_name;     /* 端末デバイス名 */
    char *ty_getty;    /* 実行するコマンド。通常は getty */
    char *ty_type;     /* termcap のための端末タイプ */
    int   ty_status;   /* 状態フラグ */
    char *ty_window;   /* ウィンドウマネージャを起動するコマンド */
    char *ty_comment;  /* コメントフィールド */
};
.fi
.in

\fIty_status\fP は以下のいずれか値をとることができる。
.br
.nf

#define TTY_ON     0x01  /* ログインを有効にする (ty_getty プログラムを開始する) */
#define TTY_SECURE 0x02  /* ユーザ ID 0 でのログインを許可する */
.fi
.SH 準拠
POSIX.1\-2001 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。
.SH 注意
Linux では、ファイル \fI/etc/ttys\fP と上で説明した関数は使われていない。
.SH 関連項目
\fBttyname\fP(3), \fBttyslot\fP(3)
.SH この文書について
この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。