.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) .\" Distributed under GPL .\" .\" Japanese Version Copyright (c) 2004 Yuichi SATO .\" all rights reserved. .\" Translated Fri Aug 20 03:27:22 JST 2004 .\" by Yuichi SATO .\" .TH GETTTYENT 3 2002-07-18 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O getttyent, getttynam, setttyent, endttyent \- get ttys file entry getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリを取得する .\"O .SH SYNOPSIS .SH 書式 .B "#include " .sp .B "struct ttyent *getttyent(void);" .sp .BI "struct ttyent *getttynam(const char *" name ); .sp .B "int setttyent(void);" .sp .B "int endttyent(void);" .\"O .SH DESCRIPTION .SH 説明 .\"O These functions provide an interface to the file .\"O .B _PATH_TTYS .\"O (e.g., .\"O .IR /etc/ttys ). これらの関数はファイル .B _PATH_TTYS (例えば .IR /etc/ttys ) へのインタフェースを提供する。 .\"O The function .\"O .BR setttyent () .\"O opens the file or rewinds it if already open. 関数 .BR setttyent () はファイルをオープンする。 また既にオープンされている場合は、巻き戻す。 .\"O The function .\"O .BR endttyent () .\"O closes the file. 関数 .BR endttyent () はファイルをクローズする。 .\"O The function .\"O .BR getttynam () .\"O searches for a given ttyname in the file. .\"O It returns a pointer to a .\"O .I ttyent .\"O structure (description below). 関数 .BR getttynam () は指定された端末名についてファイルを検索する。 この関数は (以下で説明されている) .I ttyent 構造体へのポインタを返す。 .\"O The function .\"O .BR getttyent () .\"O opens the file .\"O .B _PATH_TTYS .\"O (if necessary) and returns the first entry. .\"O If the file is already open, the next entry. 関数 .BR getttyent () は (もし必要であれば) ファイル .B _PATH_TTYS をオープンし、最初のエントリを返す。 ファイルが既にオープンされている場合は、次のエントリを返す。 .\"O The .\"O .I ttyent .\"O structure has the form: .I ttyent 構造体は以下の通りである。 .in +4n .nf struct ttyent { .\"O char *ty_name; /* terminal device name */ .\"O char *ty_getty; /* command to execute, usually getty */ .\"O char *ty_type; /* terminal type for termcap */ .\"O int ty_status; /* status flags */ .\"O char *ty_window; /* command to start up window manager */ .\"O char *ty_comment; /* comment field */ char *ty_name; /* 端末デバイス名 */ char *ty_getty; /* 実行するコマンド。通常は getty */ char *ty_type; /* termcap のための端末タイプ */ int ty_status; /* 状態フラグ */ char *ty_window; /* ウィンドウマネージャを起動するコマンド */ char *ty_comment; /* コメントフィールド */ }; .fi .in .\"O .I ty_status .\"O can be: .I ty_status は以下のいずれか値をとることができる。 .br .nf .\"O #define TTY_ON 0x01 /* enable logins (start ty_getty program) */ .\"O #define TTY_SECURE 0x02 /* allow UID 0 to login */ #define TTY_ON 0x01 /* ログインを有効にする (ty_getty プログラムを開始する) */ #define TTY_SECURE 0x02 /* ユーザ ID 0 でのログインを許可する */ .fi .\"O .SH "CONFORMING TO" .SH 準拠 .\"O Not in POSIX.1-2001. .\"O Present on the BSDs, and perhaps other systems. POSIX.1-2001 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。 .\"O .SH NOTES .SH 注意 .\"O Under Linux the file .\"O .IR /etc/ttys , .\"O and the functions described above, are not used. Linux では、ファイル .I /etc/ttys と上で説明した関数は使われていない。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR ttyname (3), .BR ttyslot (3)