OSDN Git Service

LDP: Update draft based on the previous commit (tty)
authorAkihiro Motoki <amotoki@gmail.com>
Sun, 28 Mar 2021 07:26:12 +0000 (16:26 +0900)
committerAkihiro Motoki <amotoki@gmail.com>
Mon, 29 Mar 2021 14:15:14 +0000 (23:15 +0900)
18 files changed:
manual/LDP_man-pages/draft/man3/getpass.3
manual/LDP_man-pages/draft/man3/getpt.3
manual/LDP_man-pages/draft/man3/getttyent.3
manual/LDP_man-pages/draft/man3/grantpt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/openpty.3
manual/LDP_man-pages/draft/man3/posix_openpt.3
manual/LDP_man-pages/draft/man3/ptsname.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/termios.3
manual/LDP_man-pages/draft/man3/ttyname.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ttyslot.3
manual/LDP_man-pages/draft/man3/unlockpt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man4/pts.4 [new file with mode: 0644]
manual/LDP_man-pages/draft/man4/tty.4
manual/LDP_man-pages/draft/man5/securetty.5 [new file with mode: 0644]
manual/LDP_man-pages/draft/man5/termcap.5
manual/LDP_man-pages/draft/man5/ttytype.5
manual/LDP_man-pages/draft/man7/pty.7 [new file with mode: 0644]
manual/LDP_man-pages/draft/man7/termio.7 [new file with mode: 0644]

index abad63f..18a2105 100644 (file)
@@ -54,8 +54,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 glibc 2.2.2 以降:
 .nf
 _XOPEN_SOURCE && ! (_POSIX_C_SOURCE\ >=\ 200112L)
-    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
-    || /* Glibc versions <= 2.19: */ _BSD_SOURCE
+    || /* glibc 2.19 以降: */ _DEFAULT_SOURCE
+    || /* glibc <= 2.19: */ _BSD_SOURCE
 .fi
 .TP  4
 glibc 2.2.2 より前:
index 712c755..1d58f14 100644 (file)
@@ -17,7 +17,7 @@
 .\"
 .TH GETPT 3 2020\-08\-13 GNU "Linux Programmer's Manual"
 .SH 名前
-getpt \- open a new pseudoterminal master
+getpt \- 新規の擬似端末マスタをオープンする
 .SH 書式
 .nf
 \fB#define _GNU_SOURCE\fP             /* feature_test_macros(7) 参照 */
@@ -26,9 +26,8 @@ getpt \- open a new pseudoterminal master
 \fBint getpt(void);\fP
 .fi
 .SH 説明
-\fBgetpt\fP()  opens a new pseudoterminal device and returns a file descriptor
-that refers to that device.  It is equivalent to opening the pseudoterminal
-multiplexor device
+\fBgetpt\fP() は、新規の擬似端末デバイスをオープンし、このデバイスを参照するファイルディスクリプターを返す。 これは、 Linux
+システムにおいては、以下のように擬似端末多重デバイスをオープンするのと等価である。
 .PP
 .in +4n
 .EX
@@ -36,8 +35,7 @@ open("/dev/ptmx", O_RDWR);
 .EE
 .in
 .PP
-on Linux systems, though the pseudoterminal multiplexor device is located
-elsewhere on some systems that use the GNU C library.
+但し、 GNU C ライブラリを使用していても、擬似端末多重デバイスがどこか他の場所にあるシステムもある。
 .SH 返り値
 成功した場合、 \fBgetpt\fP()  はオープンしたファイルのディスクリプターを返す。 そうでない場合、\-1 を返し、 \fIerrno\fP
 にエラーを示す値がセットされる。
index dea646c..4a063a7 100644 (file)
@@ -77,7 +77,7 @@ T{
 T}     Thread safety   MT\-Unsafe race:ttyent
 .TE
 .SH 準拠
-Not in POSIX.1.  Present on the BSDs, and perhaps other systems.
+POSIX.1 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。
 .SH 注意
 Linux では、ファイル \fI/etc/ttys\fP と上で説明した関数は使われていない。
 .SH 関連項目
diff --git a/manual/LDP_man-pages/draft/man3/grantpt.3 b/manual/LDP_man-pages/draft/man3/grantpt.3
new file mode 100644 (file)
index 0000000..5325bca
--- /dev/null
@@ -0,0 +1,89 @@
+.\" %%%LICENSE_START(PUBLIC_DOMAIN)
+.\" This page is in the public domain. - aeb
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Jul  8 01:56:27 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GRANTPT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+grantpt \- スレーブ擬似端末へのアクセスを許可する
+.SH 書式
+\fB#include <stdlib.h>\fP
+.PP
+\fBint grantpt(int \fP\fIfd\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBgrantpt\fP():
+.br
+.RS 4
+glibc 2.24 以降:
+    _XOPEN_SOURCE\ >=\ 500 ||
+        (_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED)
+.br
+glibc 2.23 以前:
+    _XOPEN_SOURCE
+.RE
+.ad
+.SH 説明
+\fBgrantpt\fP() 関数は、ファイルディスクリプター \fIfd\fP で参照されたマスタ擬似端末に対応するスレーブ擬似端末デバイス
+のモードと所有者を変更する。 スレーブのユーザーID は呼び出したプロセスの実 UID に設定される。 グループID
+として設定される値は規定されていない (例えば \fItty\fP になる)。 スレーブのモードは 0620 (crw\-\-w\-\-\-\-) に設定される。
+.PP
+\fBSIGCHLD\fP シグナルを捕捉するためにシグナルハンドラーが設定されている場合の \fBgrantpt\fP()  の動作は規定されていない。
+.SH 返り値
+成功した場合、 \fBgrantpt\fP()  は 0 を返す。そうでない場合、\-1 を返し、 \fIerrno\fP に適切な値がセットされる。
+.SH エラー
+.TP 
+\fBEACCES\fP
+対応するスレーブ擬似端末にアクセスできなかった。
+.TP 
+\fBEBADF\fP
+引き数 \fIfd\fP が有効なオープンされたファイルディスクリプターでない。
+.TP 
+\fBEINVAL\fP
+引き数 \fIfd\fP は有効だが、マスタ擬似端末に対応するものではない。
+.SH バージョン
+\fBgrantpt\fP()  は、バージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgrantpt\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+これは UNIX 98 疑似端末仕様の一部である。 \fBpts\fP(4) を参照。
+.PP
+Many systems implement this function via a set\-user\-ID helper binary called
+"pt_chown".  On Linux systems with a devpts filesystem (present since Linux
+2.2), the kernel normally sets the correct ownership and permissions for the
+pseudoterminal slave when the master is opened (\fBposix_openpt\fP(3)), so that
+nothing must be done by \fBgrantpt\fP().  Thus, no such helper binary is
+required (and indeed it is configured to be absent during the glibc build
+that is typical on many systems).
+.SH 関連項目
+\fBopen\fP(2), \fBposix_openpt\fP(3), \fBptsname\fP(3), \fBunlockpt\fP(3), \fBpts\fP(4),
+\fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index fe38b5a..c16a5f6 100644 (file)
@@ -71,34 +71,28 @@ openpty, login_tty, forkpty \- 端末ユーティリティ関数
 に返される。 \fItermp\fP が NULL でない場合、スレーブの端末パラメーターは \fItermp\fP の値に設定される。 \fIwinp\fP が
 NULL でない場合、スレーブのウインドウサイズは \fIwinp\fP に設定される。
 .PP
-The \fBlogin_tty\fP()  function prepares for a login on the terminal referred
-to by the file descriptor \fIfd\fP (which may be a real terminal device, or the
-slave of a pseudoterminal as returned by \fBopenpty\fP())  by creating a new
-session, making \fIfd\fP the controlling terminal for the calling process,
-setting \fIfd\fP to be the standard input, output, and error streams of the
-current process, and closing \fIfd\fP.
+\fBlogin_tty\fP()  関数は、ファイルディスクリプター \fIfd\fP で参照される端末にログインする準備をする (\fIfd\fP
+は実際の端末デバイスでも、 \fBopenpty\fP()  で返される疑似端末のスレーブでもよい)。 具体的には、新しいセッションを作成し、 \fIfd\fP
+を呼び出し元のプロセスの制御端末とし、 呼び出し元の標準入力・標準出力・標準エラーのストリームを \fIfd\fP に設定した後、 \fIfd\fP
+をクローズする。
 .PP
-The \fBforkpty\fP()  function combines \fBopenpty\fP(), \fBfork\fP(2), and
-\fBlogin_tty\fP()  to create a new process operating in a pseudoterminal.  A
-file descriptor referring to master side of the pseudoterminal is returned
-in \fIamaster\fP.  If \fIname\fP is not NULL, the buffer it points to is used to
-return the filename of the slave.  The \fItermp\fP and \fIwinp\fP arguments, if
-not NULL, will determine the terminal attributes and window size of the
-slave side of the pseudoterminal.
+\fBforkpty\fP() 関数は \fBopenpty\fP(), \fBfork\fP(2), \fBlogin_tty\fP()
+を組み合わせ、疑似端末を操作する新しいプロセスを生成する。疑似端末のマスタ側を参照するファイルディスクリプターは \fIamaster\fP で返される。
+\fIname\fP が NULL でない場合には、スレーブのファイル名を返すのに \fIname\fP が指すバッファーが使用される。 \fItermp\fP と
+\fIwinp\fP 引き数は、NULL でなければ、 疑似端末のスレーブ側の端末属性とウインドウサイズを決定する。
 .SH 返り値
 \fBopenpty\fP(), \fBlogin_tty\fP(), \fBforkpty\fP()  の呼び出しが成功しなかった場合、 \-1 が返されて、
 \fIerrno\fP はエラーを示す値に設定される。 成功した場合、 \fBopenpty\fP(), \fBlogin_tty\fP()  および  
 \fBforkpty\fP()  の子プロセスは 0 を返し、 \fBforkpty\fP()  の親プロセスは子プロセスのプロセス ID を返す。
 .SH エラー
-\fBopenpty\fP()  fails if:
+以下の場合に \fBopenpty\fP()  は失敗する:
 .TP 
 \fBENOENT\fP
 使用可能な端末がない。
 .PP
-\fBlogin_tty\fP()  fails if \fBioctl\fP(2)  fails to set \fIfd\fP to the controlling
-terminal of the calling process.
+\fBioctl\fP(2) が \fIfd\fP を呼び出し元のプロセスの制御端末に設定するのに失敗した場合、 \fBlogin_tty\fP() は失敗する。
 .PP
-\fBforkpty\fP()  fails if either \fBopenpty\fP()  or \fBfork\fP(2)  fails.
+\fBopenpty\fP() と \fBfork\fP(2) のどちらかが失敗した場合、 \fBforkpty\fP()  は失敗する。
 .SH 属性
 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
index 133fa08..f54c9ca 100644 (file)
@@ -64,9 +64,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 \fBO_NOCTTY\fP
 このデバイスをプロセスの制御端末としない。
 .SH 返り値
-On success, \fBposix_openpt\fP()  returns a file descriptor (a nonnegative
-integer) which is the lowest numbered unused file descriptor.  On failure,
-\-1 is returned, and \fIerrno\fP is set to indicate the error.
+成功した場合、 \fBposix_openpt\fP() は、未使用のファイルディスクリプターのうち最小の値のファイルディスクリプター (非負の整数)
+を返す。失敗した場合、\-1 が返されて、エラーを示すために \fIerrno\fP が設定される。
 .SH エラー
 \fBopen\fP(2)  を参照すること。
 .SH バージョン
@@ -85,12 +84,10 @@ T}  Thread safety   MT\-Safe
 .SH 準拠
 POSIX.1\-2001, POSIX.1\-2008.
 .PP
-\fBposix_openpt\fP()  is part of the UNIX 98 pseudoterminal support (see
-\fBpts\fP(4)).
+\fBposix_openpt\fP() は UNIX 98 疑似端末仕様の一部である。 \fBpts\fP(4) を参照。
 .SH 注意
-Some older UNIX implementations that support System V (aka UNIX 98)
-pseudoterminals don't have this function, but it can be easily implemented
-by opening the pseudoterminal multiplexor device:
+System V (別名 UNIX 98) 疑似端末をサポートする古い UNIX
+実装の中には、この関数を持たないものもあるが、以下のように擬似端末多重デバイスをオープンすることで簡単に実装できる。
 .PP
 .in +4n
 .EX
diff --git a/manual/LDP_man-pages/draft/man3/ptsname.3 b/manual/LDP_man-pages/draft/man3/ptsname.3
new file mode 100644 (file)
index 0000000..064d038
--- /dev/null
@@ -0,0 +1,106 @@
+.\" %%%LICENSE_START(PUBLIC_DOMAIN)
+.\" This page is in the public domain. - aeb
+.\" %%%LICENSE_END
+.\"
+.\" 2004-12-17, mtk, added description of ptsname_r() + ERRORS
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2003-07-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2005-02-27, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH PTSNAME 3 2020\-06\-09 "" "Linux Programmer's Manual"
+.SH 名前
+ptsname, ptsname_r \- スレーブ擬似端末の名前を取得する
+.SH 書式
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *ptsname(int \fP\fIfd\fP\fB);\fP
+.br
+\fBint ptsname_r(int \fP\fIfd\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBptsname\fP():
+.br
+.RS 4
+glibc 2.24 以降:
+    _XOPEN_SOURCE\ >=\ 500 ||
+        (_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED)
+.br
+glibc 2.23 以前:
+    _XOPEN_SOURCE
+.RE
+.PP
+\fBptsname_r\fP():
+    _GNU_SOURCE
+.ad
+.SH 説明
+\fBptsname\fP() 関数は、ファイルディスクリプター \fIfd\fP で参照されるマスタ擬似端末 (pts) デバイスに対応する
+スレーブ擬似端末デバイスの名前を返す。
+.PP
+\fBptsname_r\fP()  関数は \fBptsname\fP()  のリエントラントなバージョンである。
+この関数は、スレーブ疑似端末デバイスの名前を、ヌルで終端された文字列の形で \fIbuf\fP で指定されたバッファーに格納して返す。 \fIbuflen\fP
+引き数には \fIbuf\fP のバイト数を指定する。
+.SH 返り値
+成功の場合、 \fBptsname\fP()  は静的記憶領域の文字列へのポインターを返す。 この記憶領域はこの後の \fBptsname\fP()
+の呼び出しで上書きされる。 このポインターを free してはいけない。 エラーの場合は NULL を返す。
+.PP
+.\" In glibc, the error number is not only returned as the return value
+.\" but also stored in errno. But this is not true for musl libc.
+成功の場合、 \fBptsname_r\fP()  は 0 を返す。 エラーの場合、0 以外の値を返し、エラーを示すため、エラー番号が返される。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+.\" glibc commit 8f0a947cf55f3b0c4ebdf06953c57eff67a22fa9
+(\fBptsname_r\fP()  only)  \fIbuf\fP is NULL.  (This error is returned only for
+glibc 2.25 and earlier.)
+.TP 
+\fBENOTTY\fP
+\fIfd\fP がマスタ疑似端末デバイスを参照していない。
+.TP 
+\fBERANGE\fP
+(\fBptsname_r\fP()  のみ)  \fIbuf\fP が小さすぎる。
+.SH バージョン
+\fBptsname\fP()  は、バージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBptsname\fP()
+T}     Thread safety   MT\-Unsafe race:ptsname
+T{
+\fBptsname_r\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+\fBptsname\fP():
+ POSIX.1\-2001, POSIX.1\-2008.
+.PP
+\fBptsname\fP() は UNIX 98 疑似端末仕様の一部である (\fBpts\fP(4) を参照のこと)。
+.PP
+.\" FIXME . for later review when Issue 8 is one day released
+.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8
+.\" http://austingroupbugs.net/view.php?id=508
+\fBptsname_r\fP() は Linux による拡張であり、 POSIX.1 の次のメジャーバージョン (Issue 8)
+に含めるように提案されている。この関数についての記載があるものとして Tru64 と HP\-UX があるが、 これらの OS での実装ではエラーの場合
+\-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。 移植を考慮したプログラムではこの関数の使用は避けること。
+.SH 関連項目
+\fBgrantpt\fP(3), \fBposix_openpt\fP(3), \fBttyname\fP(3), \fBunlockpt\fP(3), \fBpts\fP(4),
+\fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 0abcbe2..6ebe1f1 100644 (file)
@@ -97,9 +97,9 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 .PP
 \fBcfsetspeed\fP(),
 \fBcfmakeraw\fP():
-    Since glibc 2.19:
+    glibc 2.19 以降:
         _DEFAULT_SOURCE
-    Glibc 2.19 and earlier:
+    glibc 2.19 以前:
         _BSD_SOURCE
 .SH 説明
 termios 関数群は、非同期通信ポートを制御するための汎用 ターミナルインターフェースである。
@@ -149,8 +149,7 @@ has the value \e377, and \fBISTRIP\fP (see below) is not set, the program might
 confuse it with the prefix that marks a parity error.  Therefore, a valid
 byte \e377 is passed to the program as two bytes, \e377 \e377, in this case.
 .IP
-If neither \fBIGNPAR\fP nor \fBPARMRK\fP is set, read a character with a parity
-error or framing error as \e0.
+\fBIGNPAR\fP も \fBPARMRK\fP も 設定されていない場合、パリティエラーあるいはフレームエラーの発生した文字を \e0 として読み込む。
 .TP 
 \fBINPCK\fP
 入力のパリティチェックを有効にする。
@@ -223,10 +222,10 @@ CR の遅延を設定する。値は \fBCR0\fP (遅延なし), \fBCR1\fP, \fBCR2
 \fB_SVID_SOURCE\fP か \fB_XOPEN_SOURCE\fP が必要]
 .TP 
 \fBTABDLY\fP
-Horizontal tab delay mask.  Values are \fBTAB0\fP, \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP
-(or \fBXTABS\fP, but see the \fBBUGS\fP section).  A value of TAB3, that is,
-XTABS, expands tabs to spaces (with tab stops every eight columns).
-[requires \fB_BSD_SOURCE\fP or \fB_SVID_SOURCE\fP or \fB_XOPEN_SOURCE\fP]
+水平タブ (horizontal tab) の遅延を設定する。 値は \fBTAB0\fP, \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (または
+\fBXTABS\fP; ただし「バグ」を参照) である。 [\fB_BSD_SOURCE\fP か \fB_SVID_SOURCE\fP か
+\fB_XOPEN_SOURCE\fP が必要] XTAB3 (これは XTABS と同じである) の値はタブをスペース何個に変換するかを示す (タブは 8
+桁毎に止まる)。
 .TP 
 \fBBSDLY\fP
 後退 (backspace) の遅延を設定する。 値は \fBBS0\fP (遅延なし) あるいは \fBBS1\fP である。 (実装されたことはない)
@@ -322,11 +321,9 @@ INTR, QUIT, SUSP, DSUSP の文字を受信した時、対応するシグナル
 \fBICANON\fP も同時に設定された場合、 ECHO が設定されていなくても NL 文字をエコーする。
 .TP 
 \fBECHOCTL\fP
-(not in POSIX) If \fBECHO\fP is also set, terminal special characters other
-than TAB, NL, START, and STOP are echoed as \fB\(haX\fP, where X is the
-character with ASCII code 0x40 greater than the special character.  For
-example, character 0x08 (BS) is echoed as \fB\(haH\fP.  [requires
-\fB_BSD_SOURCE\fP or \fB_SVID_SOURCE\fP]
+(POSIX にはない) \fBECHO\fP も同時に設定された場合、TAB, NL, START, STOP 以外の端末特殊文字が \fB\(haX\fP
+としてエコーされる。 X は特殊文字に ASCII コードで 0x40 を足した文字である。例えば文字 0x08 (BS) は \fB\(haH\fP
+とエコーされる。 [\fB_BSD_SOURCE\fP か \fB_SVID_SOURCE\fP が必要]
 .TP 
 \fBECHOPRT\fP
 (POSIX にはない) \fBICANON\fP および \fBECHO\fP が同時に設定されている場合、
@@ -474,9 +471,9 @@ System V で (シェルのジョブ制御の前にあった) \fIshell layers\fP
 .IP \fBTCSAFLUSH\fP
 パラメーターを変更する前に、 \fIfd\fP への出力がすべて転送され、受信したがまだ読み込んでいないすべての 入力が破棄される。
 .SS カノニカルモードと非カノニカルモード
-The setting of the \fBICANON\fP canon flag in \fIc_lflag\fP determines whether the
-terminal is operating in canonical mode (\fBICANON\fP set) or noncanonical mode
-(\fBICANON\fP unset).  By default, \fBICANON\fP is set.
+\fIc_lflag\fP の \fBICANON\fP フラグの設定により、端末がカノニカルモードで動作するかが決定される。 \fBICANON\fP
+がセットされた場合、カノニカルモード (canonical mode) となり、 セットされない場合、非カノニカルモード (noncanonical
+mode) となる。 デフォルトでは、 \fBICANON\fP はセットされる。
 .PP
 カノニカルモードでは、以下のような動作となる。
 .IP * 2
@@ -554,12 +551,9 @@ termios_p\->c_cflag |= CS8;
 .in
 .\"
 .SS ライン制御
-\fBtcsendbreak\fP()  transmits a continuous stream of zero\-valued bits for a
-specific duration, if the terminal is using asynchronous serial data
-transmission.  If \fIduration\fP is zero, it transmits zero\-valued bits for at
-least 0.25 seconds, and not more than 0.5 seconds.  If \fIduration\fP is not
-zero, it sends zero\-valued bits for some implementation\-defined length of
-time.
+\fBtcsendbreak\fP()  は端末が非同期のシリアルデータ転送を用いている場合に、 連続した0のビット列を一定間隔で転送する。
+\fIduration\fP が 0 の場合は、0 のビットを 0.25 秒以上、 0.5 秒以下の間隔で転送する。 \fIduration\fP が 0
+でない場合は、 0 のビットを実装依存の時間間隔で送る。
 .PP
 端末が非同期のシリアルデータ転送モードでない場合、 \fBtcsendbreak\fP()  は何も行わずに戻る。
 .PP
diff --git a/manual/LDP_man-pages/draft/man3/ttyname.3 b/manual/LDP_man-pages/draft/man3/ttyname.3
new file mode 100644 (file)
index 0000000..2170112
--- /dev/null
@@ -0,0 +1,104 @@
+.\" Copyright (c) 1995 Jim Van Zandt <jrv@vanzandt.mv.com>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\" Modified 2001-12-13, Martin Schulze <joey@infodrom.org>
+.\" Added ttyname_r, aeb, 2002-07-20
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
+.\"       all rights reserved.
+.\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\" Updated Fri Dec 21 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated Fri Oct 16 JST 2002 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-22, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH TTYNAME 3 2019\-10\-10 Linux "Linux Programmer's Manual"
+.SH 名前
+ttyname, ttyname_r \- 端末名を返す
+.SH 書式
+.nf
+\fB#include <unistd.h>\fP
+.PP
+\fBchar *ttyname(int \fP\fIfd\fP\fB);\fP
+.PP
+\fBint ttyname_r(int \fP\fIfd\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB);\fP
+.fi
+.SH 説明
+\fBttyname\fP()  関数は、ファイルディスクリプター \fIfd\fP がオープンしている端末デバイスの NULL
+終端されたパス名へのポインターを返す。 エラーが起きたならば NULL を返す (たとえば、\fIfd\fP が端末を参照していないとき)。
+返り値は静的データを指しているので、次の呼び出しで上書きされる可能性がある。 \fBttyname_r\fP()  関数は、このパス名を長さ
+\fIbuflen\fP のバッファー \fIbuf\fP に格納する。
+.SH 返り値
+\fBttyname\fP()  関数は、成功時はパス名へのポインターを返す。 エラー時は NULL を返し、 \fIerrno\fP が適切に設定される。
+\fBttyname_r\fP()  関数は、成功時には 0 を返し、エラー時にはエラー番号を返す。
+.SH エラー
+.TP 
+\fBEBADF\fP
+ファイルディスクリプターが不正。
+.TP 
+.\" glibc commit 15e9a4f378c8607c2ae1aa465436af4321db0e23
+\fBENODEV\fP
+\fIfd\fP refers to a slave pseudoterminal device but the corresponding pathname
+could not be found (see NOTES).
+.TP 
+\fBENOTTY\fP
+\fIfd\fP が端末デバイスを参照していない。
+.TP 
+\fBERANGE\fP
+(\fBttyname_r\fP()) \fIbuflen\fP がパス名を格納するには短すぎる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBttyname\fP()
+T}     Thread safety   MT\-Unsafe race:ttyname
+T{
+\fBttyname_r\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, 4.2BSD.
+.SH 注意
+A process that keeps a file descriptor that refers to a \fBpts\fP(4)  device
+open when switching to another mount namespace that uses a different
+\fI/dev/ptmx\fP instance may still accidentally find that a device path of the
+same name for that file descriptor exists.  However, this device path refers
+to a different device and thus can't be used to access the device that the
+file descriptor refers to.  Calling \fBttyname\fP()  or \fBttyname_r\fP()  on the
+file descriptor in the new mount namespace will cause these functions to
+return NULL and set \fIerrno\fP to \fBENODEV\fP.
+.SH 関連項目
+\fBtty\fP(1), \fBfstat\fP(2), \fBctermid\fP(3), \fBisatty\fP(3), \fBpts\fP(4)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index bedff6d..aa1e998 100644 (file)
@@ -40,7 +40,7 @@
 .SH 名前
 ttyslot \- カレントユーザーの端末のスロットをファイルから探す
 .SH 書式
-\fB#include <unistd.h>\fP /See NOTES */
+\fB#include <unistd.h>\fP /* 「注意」を参照 */
 .PP
 \fBint ttyslot(void);\fP
 .PP
@@ -51,14 +51,14 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 .ad l
 \fBttyslot\fP():
 .RS 4
-Since glibc 2.24:
+glibc 2.24 以降:
     _DEFAULT_SOURCE
 .br
-From glibc 2.20 to 2.23:
+glibc 2.20 から 2.23 まで:
     _DEFAULT_SOURCE ||
     _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE\ <\ 500
 .br
-Glibc 2.19 and earlier:
+Glibc 2.19 以前:
     _BSD_SOURCE ||
     _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE\ <\ 500
 .RE
@@ -108,8 +108,8 @@ T}  Thread safety   MT\-Unsafe
 SUSv1。SUSv2 では「過去の名残 (LEGACY)」と位置付けられている。 POSIX.1\-2001 で削除された。 SUSv2 ではエラー時に
 \-1 を返すことが要求されている。
 .SH 注意
-The utmp file is found in various places on various systems, such as
-\fI/etc/utmp\fP, \fI/var/adm/utmp\fP, \fI/var/run/utmp\fP.
+utmp ファイルは様々なシステムで \fI/etc/utmp\fP, \fI/var/adm/utmp\fP, \fI/var/run/utmp\fP
+のようにいろいろな場所にある。
 .PP
 この関数の glibc2 における実装では、ファイル \fB_PATH_TTYS\fP を読み込む。 これは \fI<ttyent.h>\fP
 において "/etc/ttys" と定義されている。 エラーの場合、0 を返す。 Linux システムには通常 "/etc/ttys" がないので、常に
diff --git a/manual/LDP_man-pages/draft/man3/unlockpt.3 b/manual/LDP_man-pages/draft/man3/unlockpt.3
new file mode 100644 (file)
index 0000000..17979f3
--- /dev/null
@@ -0,0 +1,74 @@
+.\" %%%LICENSE_START(PUBLIC_DOMAIN)
+.\" This page is in the public domain. - aeb
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Jul  8 02:25:57 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH UNLOCKPT 3 2017\-07\-13 "" "Linux Programmer's Manual"
+.SH 名前
+unlockpt \- 擬似端末マスタ/スレーブのペアのロックを解除する
+.SH 書式
+\fB#define _XOPEN_SOURCE\fP
+.br
+\fB#include <stdlib.h>\fP
+.PP
+\fBint unlockpt(int \fP\fIfd\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBunlockpt\fP():
+.br
+.RS 4
+glibc 2.24 以降:
+    _XOPEN_SOURCE\ >=\ 500 ||
+        (_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED)
+.br
+glibc 2.23 以前:
+    _XOPEN_SOURCE
+.RE
+.ad
+.SH 説明
+\fBunlockpt\fP() 関数はファイルディスクリプター \fIfd\fP で参照されるマスタ擬似端末に対応するスレーブ擬似端末のロックを解除する。
+.PP
+擬似端末のスレーブ側をオープンする前に、 \fBunlockpt\fP()  を呼び出す必要がある。
+.SH 返り値
+成功した場合、 \fBunlockpt\fP()  は 0 を返す。そうでない場合、\-1 を返し、 \fIerrno\fP に適切な値がセットされる。
+.SH エラー
+.TP 
+\fBEBADF\fP
+引き数 \fIfd\fP が書き込み用にオープンされたファイルディスクリプターでない。
+.TP 
+\fBEINVAL\fP
+引き数 \fIfd\fP がマスタ擬似端末に対応するものではない。
+.SH バージョン
+\fBunlockpt\fP()  は、バージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBunlockpt\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBgrantpt\fP(3), \fBposix_openpt\fP(3), \fBptsname\fP(3), \fBpts\fP(4), \fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man4/pts.4 b/manual/LDP_man-pages/draft/man4/pts.4
new file mode 100644 (file)
index 0000000..f640320
--- /dev/null
@@ -0,0 +1,57 @@
+.\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
+.\" Notes added - aeb
+.\"
+.\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
+.\" Redistribute and revise at will.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Jul  8 00:28:17 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH PTS 4 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+ptmx, pts \- 擬似端末のマスタとスレーブ
+.SH 説明
+ファイル \fI/dev/ptmx\fP (擬似端末多重デバイス; pseudoterminal multiplexer device) は、メジャーナンバー
+(major number) 5、 マイナーナンバー (minor number) 2 を持つキャラクターファイルであり、 通常、モードは 0666
+で、所有権は root:root である。 このファイルは、擬似端末のマスタとスレーブのペアを作成するために使用される。
+.PP
+プロセスが \fI/dev/ptmx\fP をオープンすると、そのプロセスには 擬似端末マスタ (pseudoterminal master)
+へのファイルディスクリプターが返され、 \fI/dev/pts\fP ディレクトリに擬似端末スレーブ (pseudoterminal slave)
+デバイスが作成される。 \fI/dev/ptmx\fP
+をオープンして得られるファイルディスクリプターはそれぞれ独立の擬似端末マスタであり、対応するスレーブを各々持つ。スレーブのパス名は、マスタのファイルディスクリプターを
+\fBptsname\fP(3) に渡すと知ることができる。
+.PP
+擬似端末スレーブをオープンする前に、必ず、マスタのファイルディスクリプターを 引き数として \fBgrantpt\fP(3)  と
+\fBunlockpt\fP(3)  を呼び出さなければならない。
+.PP
+擬似端末のマスタとスレーブの両方がオープンされた後は、スレーブは、 プロセスに対して、実端末 (real terminal)
+と全く同じインターフェースを提供する。
+.PP
+スレーブに書かれたデータはマスタファイルディスクリプターに対する入力として扱われ、 マスタに書かれたデータはスレーブに対する入力として扱われる。
+.PP
+実例をあげると、擬似端末は \fBxterm\fP(1)  のような端末エミュレータを実装するのに使用されている。
+端末エミュレータでは、擬似端末のマスタから読み込まれたデータは、 アプリケーションにとって実端末のデータと全く同じもののように見える。 また、
+\fBsshd\fP(8)  のようなリモートログイン用のプログラムの実装では、 擬似端末マスタから読み込まれたデータは、ネットワークを経由して、
+端末や端末エミュレータに接続されているクライアントプログラムに送信される。
+.PP
+擬似端末は、 (\fBsu\fP(1)  や \fBpasswd\fP(1)  のような) 通常はパイプからの入力を拒否するプログラムに、
+入力を送信するためにも使用できる。
+.SH ファイル
+\fI/dev/ptmx\fP, \fI/dev/pts/*\fP
+.SH 注意
+(UNIX 98 pseudoterminal naming と呼ばれる)  上記の機能の Linux でのサポートは、通常 \fI/dev/pts\fP
+にマウントされるはずの \fIdevpts\fP ファイルシステムを通して実現されている、
+.SH 関連項目
+\fBgetpt\fP(3), \fBgrantpt\fP(3), \fBptsname\fP(3), \fBunlockpt\fP(3), \fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index f04da4c..5ceccbd 100644 (file)
@@ -44,9 +44,8 @@
 .SH 名前
 tty \- 制御端末
 .SH 説明
-The file \fI/dev/tty\fP is a character file with major number 5 and minor
-number 0, usually with mode 0666 and ownership root:tty.  It is a synonym
-for the controlling terminal of a process, if any.
+\fI/dev/tty\fP ファイルは、メジャー番号 5、マイナー番号 0 のキャラクター デバイスである。通常、そのモードは 0666、所有権は
+root:tty となっている。 プロセスの制御端末が存在する場合、このデバイスファイルはプロセスの制御端末と 同じものを表す。
 .PP
 \fBtty\fP が参照しているデバイスがサポートしている \fBioctl\fP(2)  要求に 加えて、 \fBioctl\fP(2)  要求
 \fBTIOCNOTTY\fP がサポートされている。
diff --git a/manual/LDP_man-pages/draft/man5/securetty.5 b/manual/LDP_man-pages/draft/man5/securetty.5
new file mode 100644 (file)
index 0000000..176bbaa
--- /dev/null
@@ -0,0 +1,54 @@
+.\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
+.\"     Fri Apr  2 11:32:09 MET DST 1993
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sun Jul 25 11:06:27 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 Hiroaki Nagoya all rights reserved.
+.\" Translated Wed Feb 4 1998 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\"
+.TH SECURETTY 5 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+securetty \- root がログインできる端末のリスト
+.SH 説明
+ファイル \fI/etc/securetty\fP には、認証トークンの転送が安全にできると考えられる端末の名前が書かれている (1 行にひとつで、先頭の
+\fI/dev/\fP は省略する)。
+.PP
+(いくつかのバージョンの) \fBlogin\fP(1) は、 root のログインが許可されている端末を制限するのにこのファイルを使用する。 shadow
+login suite を使用している場合は、 \fBlogin.defs\fP(5)  を参照のこと。
+.PP
+On PAM enabled systems, it is used for the same purpose by
+\fBpam_securetty\fP(8)  to restrict the terminals on which empty passwords are
+accepted.
+.SH ファイル
+\fI/etc/securetty\fP
+.SH 関連項目
+\fBlogin\fP(1), \fBlogin.defs\fP(5), \fBpam_securetty\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index db04f59..554e4ac 100644 (file)
 .SH 名前
 termcap \- 端末機能のデータベース
 .SH 説明
-The termcap database is an obsolete facility for describing the capabilities
-of character\-cell terminals and printers.  It is retained only for
-compatibility with old programs; new programs should use the \fBterminfo\fP(5)
-database and associated libraries.
+termcap データベースは、 文字単位で動作する端末やプリンタの機能を記述するための旧式の機構である。
+この機構は古いプログラムでの互換性のためだけに保持されているので、 新しいプログラムは \fBterminfo\fP(5)
+データベースとそれに関連したライブラリを用いるべきである。
 .PP
 \fI/etc/termcap\fP は、多くの異なる種類の端末に関する機能を列記したアスキーファイル (データベースマスター) である。 プログラムは
 termcap を読み込んで、 実際に使用している端末に個別のエスケープコード群を取得する。
@@ -59,10 +58,8 @@ termcap のエントリーは、単一の論理行でなければならない。
 フィールドは \(aq:\(aq で分割される。 各エントリーの最初のフィールドは左側先頭から始まり、
 内容はその端末の名前のリストである。名前の区切りには \(aq|\(aq が用いられる。
 .PP
-The first subfield may (in BSD termcap entries from versions 4.3 and
-earlier) contain a short name consisting of two characters.  This short name
-may consist of capital or small letters.  In 4.4BSD, termcap entries this
-field is omitted.
+最初のサブフィールドは (4.3 以前のバージョンのBSD termcap エントリーでは)  2 文字からなる短い名前となっている。この短い名前は
+大文字もしくは小文字で構成される。4.4BSD の termcap エントリーでは、 このフィールドは省略される。
 .PP
 2 番目 (最新の 4.4BSD フォーマットでは 1 番目) のサブフィールドには、 環境変数 \fBTERM\fP で用いられる名称が入る。
 このフィールドには小文字しか使えない。 選択可能なハードウェア機能は、ハイフンと接尾語 (suffix)
@@ -76,7 +73,7 @@ video display: 反転ビデオ表示)  などがある。 3番目のサブフィ
 順序については定義されていないが、 大文字小文字は区別せずにアルファベット順にならべ、
 始めはブール値の、次は数値の、最後は文字列の機能を書くことが推奨されている。 同じような働きをする機能は 1 行にまとめて書くと良い。
 .PP
-Example for:
+:
 .nf
 .PP
 Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e
@@ -87,33 +84,33 @@ String: :sr=\eE[H:\e
 .fi
 .SS ブール値で指定する機能
 .nf
-5i     Printer will not echo on screen
-am     Automatic margins which means automatic line wrap
-bs     Control\-H (8 dec.) performs a backspace
-bw     Backspace on left margin wraps to previous line and right margin
-da     Display retained above screen
-db     Display retained below screen
-eo     A space erases all characters at cursor position
-es     Escape sequences and special characters work in status line
-gn     Generic device
-hc     This is a hardcopy terminal
-HC     The cursor is hard to see when not on bottom line
-hs     Has a status line
-hz     Hazeltine bug, the terminal can not print tilde characters
-in     Terminal inserts null bytes, not spaces, to fill whitespace
-km     Terminal has a meta key
-mi     Cursor movement works in insert mode
-ms     Cursor movement works in standout/underline mode
-NP     No pad character
-NR     ti does not reverse te
-nx     No padding, must use XON/XOFF
-os     Terminal can overstrike
-ul     Terminal underlines although it can not overstrike
-xb     Beehive glitch, f1 sends ESCAPE, f2 sends \fB\(haC\fP
-xn     Newline/wraparound glitch
-xo     Terminal uses xon/xoff protocol
-xs     Text typed over standout text will be displayed in standout
-xt     Teleray glitch, destructive tabs and odd standout mode
+5i     プリンタはスクリーンにエコーしない
+am     自動マージン。自動的に行を折り返す
+bs     コントロール H (キーコード 8) をバックスペースとして扱う
+bw     左端でのバックスペースを、上の行の右端に折り返す
+da     画面の上端から外れていた行を表示する (通常はマルチページ端末で)
+db     画面の下端から外れていた行を表示する (通常はマルチページ端末で)
+eo     空白文字はカーソル位置の全ての文字を消す
+es     ステータス行上のエスケープシーケンスや特殊文字は有効に働く
+gn     一般的なデバイスである
+hc     ハードコピー端末である
+HC     最下行にないカーソルは見づらい
+hs     ステータス行がある
+hz     チルダ文字が表示できない端末である (Hazeltine 端末のバグ)
+in     ホワイトスペースを埋めるのに、スペースではなくヌルバイトを挿入する端末である
+km     端末にはメタキーがある
+mi     挿入モードでもカーソル移動ができる
+ms     強調/下線モードでもカーソル移動ができる
+NP     パディング文字がない
+NR     ti は te を反転しない
+nx     パディングではなく、XON/XOFF を使わなければならない
+os     重ね打ちが可能な端末である
+ul     重ね打ちはできないが、下線表示のできる端末である
+xb     f1 はエスケープを送信し、f2 は \fB\(haC\fP を送信する (Beehive 端末の不具合)
+xn     改行/折り返しに不具合がある
+xo     端末は xon/xoff プロトコルを用いる
+xs     強調文字の上に出力された文字は強調文字として表示される
+xt     破壊的なタブと中途半端な強調モード (Teleray 端末の不具合)
 .fi
 .SS 数値で指定する機能
 .nf
@@ -138,243 +135,242 @@ ws      ステータス行の幅 (画面幅と異なる場合)
 .fi
 .SS 文字列で指定する機能
 .nf
-!1     shifted save key
-!2     shifted suspend key
-!3     shifted undo key
-#1     shifted help key
-#2     shifted home key
-#3     shifted input key
-#4     shifted cursor left key
-%0     redo key
-%1     help key
-%2     mark key
-%3     message key
-%4     move key
-%5     next\-object key
-%6     open key
-%7     options key
-%8     previous\-object key
-%9     print key
-%a     shifted message key
-%b     shifted move key
-%c     shifted next key
-%d     shifted options key
-%e     shifted previous key
-%f     shifted print key
-%g     shifted redo key
-%h     shifted replace key
-%i     shifted cursor right key
-%j     shifted resume key
-&0     shifted cancel key
-&1     reference key
-&2     refresh key
-&3     replace key
-&4     restart key
-&5     resume key
-&6     save key
-&7     suspend key
-&8     undo key
-&9     shifted begin key
-*0     shifted find key
-*1     shifted command key
-*2     shifted copy key
-*3     shifted create key
-*4     shifted delete character
-*5     shifted delete line
-*6     select key
-*7     shifted end key
-*8     shifted clear line key
-*9     shifted exit key
-@0     find key
-@1     begin key
-@2     cancel key
-@3     close key
-@4     command key
-@5     copy key
-@6     create key
-@7     end key
-@8     enter/send key
-@9     exit key
-al     Insert one line
-AL     Insert %1 lines
-ac     Pairs of block graphic characters to map alternate character set
-ae     End alternative character set
-as     Start alternative character set for block graphic characters
-bc     Backspace, if not \fB\(haH\fP
-bl     Audio bell
-bt     Move to previous tab stop
-cb     Clear from beginning of line to cursor
-cc     Dummy command character
-cd     Clear to end of screen
-ce     Clear to end of line
-ch     Move cursor horizontally only to column %1
-cl     Clear screen and cursor home
-cm     Cursor move to row %1 and column %2 (on screen)
-CM     Move cursor to row %1 and column %2 (in memory)
-cr     Carriage return
-cs     Scroll region from line %1 to %2
-ct     Clear tabs
-cv     Move cursor vertically only to line %1
-dc     Delete one character
-DC     Delete %1 characters
-dl     Delete one line
-DL     Delete %1 lines
-dm     Begin delete mode
-do     Cursor down one line
-DO     Cursor down #1 lines
-ds     Disable status line
-eA     Enable alternate character set
-ec     Erase %1 characters starting at cursor
-ed     End delete mode
-ei     End insert mode
-ff     Formfeed character on hardcopy terminals
-fs     Return character to its position before going to status line
-F1     The string sent by function key f11
-F2     The string sent by function key f12
-F3     The string sent by function key f13
+!1     シフト状態の save キー
+!2     シフト状態の suspend キー
+!3     シフト状態の undo キー
+#1     シフト状態の help キー
+#2     シフト状態の home キー
+#3     シフト状態の input キー
+#4     シフト状態の左カーソルキー
+%0     redo キー
+%1     help キー
+%2     markキー
+%3     message キー
+%4     move キー
+%5     next\-object キー
+%6     open キー
+%7     options キー
+%8     previous\-object キー
+%9     print キー
+%a     シフト状態の message キー
+%b     シフト状態の move キー
+%c     シフト状態の next キー
+%d     シフト状態の options キー
+%e     シフト状態の previous キー
+%f     シフト状態の print キー
+%g     シフト状態の redo キー
+%h     シフト状態の replace キー
+%i     シフト状態の右カーソルキー
+%j     シフト状態の resume キー
+&0     シフト状態の cancel キー
+&1     reference キー
+&2     refresh キー
+&3     replace キー
+&4     restart キー
+&5     resume キー
+&6     save キー
+&7     suspend キー
+&8     undo キー
+&9     シフト状態の begin キー
+*0     シフト状態の find キー
+*1     シフト状態の command キー
+*2     シフト状態の copy キー
+*3     シフト状態の create キー
+*4     シフト状態の delete キー
+*5     シフト状態の delete line キー
+*6     select キー
+*7     シフト状態の end キー
+*8     シフト状態の clear line キー
+*9     シフト状態の exit キー
+@0     find キー
+@1     begin キー
+@2     cancel キー
+@3     close キー
+@4     command キー
+@5     copy キー
+@6     create キー
+@7     end キー
+@8     enter/send キー
+@9     exit キー
+al     1 行挿入する
+AL     %1 行挿入する
+ac     図形文字のペアの集合。代替文字セットにマップするためのもの
+ae     代替文字セットの終り
+as     図形文字集合に対する、代替文字セットの開始
+bc     \fB\(haH\fP がバックスペースでない場合のバックスペース
+bl     (音声の) ベルを鳴らす
+bt     前のタブストップへ移動
+cb     行頭からカーソル位置までのクリア
+cc     ダミーコマンド文字
+cd     画面の最後までをクリア
+ce     行の最後までをクリア
+ch     カーソルを水平方向にだけ移動し、 %1 桁の位置にする
+cl     画面を消去し、カーソルをホームポジションへ
+cm     画面上の %1 行、 %2 桁へカーソルを移動
+CM     メモリー上の %1 行、 %2 桁へカーソルを移動
+cr     復帰
+cs     %1 行目から %2 行目までの範囲をスクロールする
+ct     タブの消去
+cv     カーソルを垂直方向にだけ移動し、 %1 行の位置にする
+dc     一文字削除する
+DC     %1 文字削除する
+dl     一行削除する
+DL     %1 行削除する
+dm     delete モード開始
+do     カーソルを一行下げる
+DO     カーソルを #1 行下げる
+ds     ステータス行を無効にする
+eA     代替文字集合を有効にする
+ec     カーソル位置から %1 文字消去する
+ed     delete モード終了
+ei     intert モード終了
+ff     ハードコピー端末での頁送り文字
+fs     ステータス行に移動する前の位置へ復帰する文字
+F1     ファンクションキー f11 が送出する文字列
+F2     ファンクションキー f12 が送出する文字列
+F3     ファンクションキー f13 が送出する文字列
 \&...  \&...
-F9     The string sent by function key f19
-FA     The string sent by function key f20
-FB     The string sent by function key f21
+F9     ファンクションキー f19 が送出する文字列
+FA     ファンクションキー f20 が送出する文字列
+FB     ファンクションキー f21 が送出する文字列
 \&...  \&...
-FZ     The string sent by function key f45
-Fa     The string sent by function key f46
-Fb     The string sent by function key f47
+FZ     ファンクションキー f45 が送出する文字列
+Fa     ファンクションキー f46 が送出する文字列
+Fb     ファンクションキー f47 が送出する文字列
 \&...  \&...
-Fr     The string sent by function key f63
-hd     Move cursor a half line down
-ho     Cursor home
-hu     Move cursor a half line up
-i1     Initialization string 1 at login
-i3     Initialization string 3 at login
-is     Initialization string 2 at login
-ic     Insert one character
-IC     Insert %1 characters
-if     Initialization file
-im     Begin insert mode
-ip     Insert pad time and needed special characters after insert
-iP     Initialization program
-K1     upper left key on keypad
-K2     center key on keypad
-K3     upper right key on keypad
-K4     bottom left key on keypad
-K5     bottom right key on keypad
-k0     Function key 0
-k1     Function key 1
-k2     Function key 2
-k3     Function key 3
-k4     Function key 4
-k5     Function key 5
-k6     Function key 6
-k7     Function key 7
-k8     Function key 8
-k9     Function key 9
-k;     Function key 10
-ka     Clear all tabs key
-kA     Insert line key
-kb     Backspace key
-kB     Back tab stop
-kC     Clear screen key
-kd     Cursor down key
-kD     Key for delete character under cursor
-ke     turn keypad off
-kE     Key for clear to end of line
-kF     Key for scrolling forward/down
-kh     Cursor home key
-kH     Cursor hown down key
-kI     Insert character/Insert mode key
-kl     Cursor left key
-kL     Key for delete line
-kM     Key for exit insert mode
-kN     Key for next page
-kP     Key for previous page
-kr     Cursor right key
-kR     Key for scrolling backward/up
-ks     Turn keypad on
-kS     Clear to end of screen key
-kt     Clear this tab key
-kT     Set tab here key
-ku     Cursor up key
-l0     Label of zeroth function key, if not f0
-l1     Label of first function key, if not f1
-l2     Label of first function key, if not f2
+Fr     ファンクションキー f63 が送出する文字列
+hd     カーソルを一行の半分だけ下に移動
+ho     カーソルをホームポジションに移動
+hu     カーソルを一行の半分だけ上に移動
+i1     ログイン時の初期化文字列 1
+i3     ログイン時の初期化文字列 3
+is     ログイン時の初期化文字列 2
+ic     一文字挿入
+IC     %1 文字挿入
+if     初期化ファイル
+im     insert モード開始
+ip     挿入後のパディングに必要な時間と特殊文字
+iP     初期化プログラム
+K1     キーパッドの左上キー
+K2     キーパッドの中央キー
+K3     キーパッドの右上キー
+K4     キーパッドの左下キー
+K5     キーパッドの右下キー
+k0     ファンクションキー 0
+k1     ファンクションキー 1
+k2     ファンクションキー 2
+k3     ファンクションキー 3
+k4     ファンクションキー 4
+k5     ファンクションキー 5
+k6     ファンクションキー 6
+k7     ファンクションキー 7
+k8     ファンクションキー 8
+k9     ファンクションキー 9
+k;     ファンクションキー 10
+ka     clea all tabs キー
+kA     insert line キー
+kb     バックスペースキー
+kB     back tab キー
+kC     clear screen キー
+kd     下カーソルキー
+kD     カーソル位置の文字を消すキー
+ke     キーパッドをオフにする
+kE     行末までをクリアするキー
+kF     前方向/下方向へスクロールするキー
+kh     home キー
+kH     cursor hown down キー
+kI     文字挿入キー/insert モードキー
+kl     左カーソルキー
+kL     行を削除するキー
+kM     insert モードを終了するキー
+kN     次のページへ移動するキー
+kP     前のページへ移動するキー
+kr     右カーソルキー
+kR     後ろ方向/上方向にスクロールするキー
+ke     キーパッドをオンにする
+kS     画面最後までをクリアするキー
+kt     タブクリアキー
+kT     タブストップ設定キー
+ku     上カーソルキー
+l0     0 番目のファンクションキーのラベル (f0 でない場合)
+l1     1 番目のファンクションキーのラベル (f1 でない場合)
+l2     2 番目のファンクションキーのラベル (f2 でない場合)
 \&...  \&...
-la     Label of tenth function key, if not f10
-le     Cursor left one character
-ll     Move cursor to lower left corner
-LE     Cursor left %1 characters
-LF     Turn soft labels off
-LO     Turn soft labels on
-mb     Start blinking
-MC     Clear soft margins
-md     Start bold mode
-me     End all mode like so, us, mb, md, and mr
-mh     Start half bright mode
-mk     Dark mode (Characters invisible)
-ML     Set left soft margin
-mm     Put terminal in meta mode
-mo     Put terminal out of meta mode
-mp     Turn on protected attribute
-mr     Start reverse mode
-MR     Set right soft margin
-nd     Cursor right one character
-nw     Carriage return command
-pc     Padding character
-pf     Turn printer off
-pk     Program key %1 to send string %2 as if typed by user
-pl     Program key %1 to execute string %2 in local mode
-pn     Program soft label %1 to show string %2
-po     Turn the printer on
-pO     Turn the printer on for %1 (<256) bytes
-ps     Print screen contents on printer
-px     Program key %1 to send string %2 to computer
-r1     Reset string 1 to set terminal to sane modes
-r2     Reset string 2 to set terminal to sane modes
-r3     Reset string 3 to set terminal to sane modes
-RA     disable automatic margins
-rc     Restore saved cursor position
-rf     Reset string filename
-RF     Request for input from terminal
-RI     Cursor right %1 characters
-rp     Repeat character %1 for %2 times
-rP     Padding after character sent in replace mode
-rs     Reset string
-RX     Turn off XON/XOFF flow control
-sa     Set %1 %2 %3 %4 %5 %6 %7 %8 %9 attributes
-SA     enable automatic margins
-sc     Save cursor position
-se     End standout mode
-sf     Normal scroll one line
-SF     Normal scroll %1 lines
-so     Start standout mode
-sr     Reverse scroll
-SR     scroll back %1 lines
-st     Set tabulator stop in all rows at current column
-SX     Turn on XON/XOFF flow control
-ta     move to next hardware tab
-tc     Read in terminal description from another entry
-te     End program that uses cursor motion
-ti     Begin program that uses cursor motion
-ts     Move cursor to column %1 of status line
-uc     Underline character under cursor and move cursor right
-ue     End underlining
-up     Cursor up one line
-UP     Cursor up %1 lines
-us     Start underlining
-vb     Visible bell
-ve     Normal cursor visible
-vi     Cursor invisible
-vs     Standout cursor
-wi     Set window from line %1 to %2 and column %3 to %4
-XF     XOFF character if not \fB\(haS\fP
+la     10 番目のファンクションキーのラベル (f10 でない場合)
+le     カーソルを左へ一文字分移動する
+ll     カーソルを左下隅に移動する
+LE     カーソルを左 %1 文字分移動する
+LF     ソフトラベルをオフにする
+LO     ソフトラベルをオンにする
+mb     点滅開始
+MC     ソフトマージンをクリア
+md     bold モード開始
+me     so, us, mb, md, mr などのモード全てを終了する
+mh     半輝度モード開始
+mk     ダークモード (文字は見えなくなる)
+ML     左側のソフトマージンを設定
+mm     端末をメタモードに設定する
+mo     端末をメタモードでなくする
+mp     属性保護モードをオンにする
+mr     反転モード開始
+MR     右端のソフトマージンを設定
+nd     カーソルを右に一文字分移動
+nw     復帰コマンド
+pc     パディング文字
+pf     プリンタをオフにする
+pk     ユーザーが入力したときに文字列 %2 を送出するプログラムキー %1
+pl     ローカルモードで文字列 %2 を実行するプログラムキー %1
+pn     文字列 %2 を表示するためのプログラムソフトラベル %1
+po     プリンタをオンにする
+pO     %1 (<256) バイトの間プリンタをオンにする
+ps     画面上の内容をプリンタに印刷する
+px     文字列 %2 をコンピュータに送出するプログラムキー %1
+r1     端末を正常なモードに設定するリセット文字列 1
+r2     端末を正常なモードに設定するリセット文字列 2
+r3     端末を正常なモードに設定するリセット文字列 3
+RA     自動折り返しを無効にする
+rc     保存しておいたカーソル位置に復帰する
+rf     リセット文字列の入ったファイル名
+RF     端末からの入力要求
+RI     カーソルを右へ %1 文字分移動する
+rp     文字 %1 を %2 回分繰り返す
+rP     置換モードにおいて、文字を送出した後に行うパディング
+rs     リセット文字列
+RX     XON/XOFF フロー制御をオフにする
+sa     属性 %1 %2 %3 %4 %5 %6 %7 %8 %9 を設定
+SA     自動折り返しを有効にする
+sc     カーソル位置を保存する
+se     強調モード終了
+sf     順方向の 1 行スクロール
+SF     順方向の %1 行スクロール
+so     強調モード開始
+sr     逆スクロール
+SR     %1 行分逆スクロールする
+st     全ての行において、現在の桁位置をタブストップに設定する
+SX     XON/XOFF フロー制御をオンにする
+ta     次のハードウェアタブ位置へ移動
+tc     他のエントリーから端末の説明を読む込む
+te     カーソル移動を用いるプログラムの終了
+ti     カーソル移動を用いるプログラムの開始
+ts     ステータス行のカーソルを %1 桁へ移動
+uc     カーソル位置の文字に下線をつけ、右にカーソルを移動
+ue     下線モード終了
+up     カーソルを 1 行分上に移動
+UP     カーソルを %1 行分上に移動
+us     下線モード開始
+vb     ビジュアルベル
+ve     カーソルを通常の明るさにする
+vi     カーソルを見えなくする
+vs     強調カーソル
+wi     ウィンドウ領域を %1〜%2 行、%3〜%4 桁に設定
+XF     XOFF 制御文字 (\fB\(haS\fP でない場合)
 .fi
 .PP
 文字列機能の制御コードを定義するには、いくつかの方法がある。
 .PP
-Every normal character represents itself, except \(aq\(ha\(aq, \(aq\e\(aq,
-and \(aq%\(aq.
+\&\(aq\(ha\(aq, \(aq\e\(aq, \(aq%\(aq を除く全ての通常の文字は、それ自身を表す。
 .PP
-A \fB\(hax\fP means Control\-x.  Control\-A equals 1 decimal.
+\fB\(hax\fP は Control\-x を意味する。 Control\-A は 10 進数の 1 に等しい。
 .PP
 \&\ex は特殊コードとして扱われる。x には以下の文字のどれかが入る。
 .RS
@@ -408,49 +404,49 @@ f 頁送り (12)
 バイナリ出力を行う場合、 文字列が終端されないようにヌル文字 (\(aq\e0\(aq) を避けねばならない。
 タブ文字をパラメーターのバイナリ出力とする場合は、 タブ文字の展開をリセットしなければならない。
 .IP 注意:
-The above metacharacters for parameters may be wrong: they document Minix
-termcap which may not be compatible with Linux termcap.
+上記のような、パラメーターとしてのメタ文字は正しくないかもしれない。これらは Minix の termcap について説明しており、 Minix の
+termcap は Linux の termap と互換性がないかもしれないからである。
 .PP
 図形文字は 3 つの文字列機能で指定できる。
 .IP as
 代替文字セットの開始
 .IP ae
-end the alternative charset
+代替文字セットの終了
 .IP ac
 文字列のペアの集合を指定する。 最初の文字は図形文字の名称で、 2 番目の文字はその定義である。
 .PP
 名称には以下のものがある。
 .PP
 .nf
-+      right arrow (>)
-,      left arrow (<)
-\&.    down arrow (v)
-0      full square (#)
-I      lantern (#)
-\-     upper arrow (\(ha)
-\&'    rhombus (+)
-a      chess board (:)
-f      degree (')
-g      plus\-minus (#)
-h      square (#)
-j      right bottom corner (+)
-k      right upper corner (+)
-l      left upper corner (+)
-m      left bottom corner (+)
-n      cross (+)
-o      upper horizontal line (\-)
-q      middle horizontal line (\-)
-s      bottom horizontal line (_)
-t      left tee (+)
-u      right tee (+)
-v      bottom tee (+)
-w      normal tee (+)
-x      vertical line (|)
-\(ti   paragraph (???)
++      右矢印 (>)
+,      左矢印 (<)
+\&.    下矢印 (v)
+0      なかを塗りつぶした四角 (#)
+I      ランタン記号 (#)
+(訳注 原文は latern だったが、これは lantern の typo と思われる)
+\-     上矢印 (\(ha)
+\&'    菱形 (+)
+a      チェス板 (:)
+f      角度 (')
+g      プラスマイナス (#)
+h      四角 (#)
+j      右下隅 (+)
+k      右上隅 (+)
+l      左上隅 (+)
+m      左下隅 (+)
+n      十字 (+)
+o      上水平線 (\-)
+q      中水平線 (\-)
+s      下水平線 (_)
+t      左 T 字 (+)
+u      右 T 字 (+)
+v      下 T 字 (+)
+w      正 T 字 (+)
+x      垂直線 (|)
+\(ti   段落 (???)
 .fi
 .PP
-The values in parentheses are suggested defaults which are used by the
-\fIcurses\fP library, if the capabilities are missing.
+括弧内の値は、指定した機能が存在しない場合に、 \fIcurses\fP ライブラリが使用する推奨デフォルト値である。
 .SH 関連項目
 \fBncurses\fP(3), \fBtermcap\fP(3), \fBterminfo\fP(5)
 .SH この文書について
index 11ae06c..37acdf4 100644 (file)
@@ -51,7 +51,7 @@ ttytype \- 端末デバイス−端末タイプのデフォルトマッピング
 .TP 
 \fI/etc/ttytype\fP
 tty 定義ファイル。
-.SH EXAMPLES
+.SH 
 典型的な \fI/etc/ttytype\fP は以下のようなものである。
 .PP
 .in +4n
diff --git a/manual/LDP_man-pages/draft/man7/pty.7 b/manual/LDP_man-pages/draft/man7/pty.7
new file mode 100644 (file)
index 0000000..29920a9
--- /dev/null
@@ -0,0 +1,111 @@
+.\" Copyright (C) 2005 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
+.\" Translated 2005-10-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH PTY 7 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+pty \- 擬似端末インターフェース
+.SH 説明
+擬似端末 (pseudoterminal; "pty" と略されることもある) は、
+双方向通信チャンネルを提供する仮想キャラクターデバイスのペアである。 チャンネルの一方の端点は \fIマスタ (master)\fP
+と呼ばれ、もう一方の端点は \fIスレーブ (slave)\fP と呼ばれる。
+.PP
+擬似端末のスレーブは、伝統的な端末と全く同じ動作をするインターフェースを 提供する。端末に接続されることを想定しているプロセスは擬似端末の
+スレーブをオープンすることができ、それ以降はマスタ側をオープン しているプログラムからそのプロセスを制御することができる。
+端末で入力されたのと同じように、 マスタ側に書き込まれた全てのデータは、スレーブ側のプロセスに送られる。 例えば、マスタデバイスに割り込みキャラクター
+(通常は control\-C) を書き込むと、 スレーブに接続されているフォアグラウンドプロセスグループに対して 割り込みシグナル
+(\fBSIGINT\fP)  が生成される。 反対に、擬似端末のスレーブ側に書き込まれた全てのデータは、
+マスタ側に接続されているプロセスから読み出すことができる。
+.PP
+Data flow between master and slave is handled asynchronously, much like data
+flow with a physical terminal.  Data written to the slave will be available
+at the master promptly, but may not be available immediately.  Similarly,
+there may be a small processing delay between a write to the master, and the
+effect being visible at the slave.
+.PP
+歴史的に見ると BSD と System V の2種類の擬似端末の API が発展してきている。 SUSv1 は System V API
+に基づいた擬似端末 API を標準化しており、 擬似端末を使用する新しいプログラムはすべてこの API を採用すべきである。
+.PP
+Linux では BSD 風と (標準化された) System V 風の擬似端末を提供している。 System V 風の端末は、Linux
+システムでは一般に UNIX 98 擬似端末と呼ばれている。
+.PP
+カーネル 2.6.4 以降では、BSD 風の擬似端末は廃止予定とされている。この機能は、カーネル作成時に \fBCONFIG_LEGACY_PTYS\fP
+オプションを無効にすることで無効にできる (Linux 2.6.30
+以降では、メインラインのカーネルでは、このオプションはデフォルトで無効になっている)。新しいアプリケーションでは、UNIX 98
+擬似端末を使用すべきである。
+.SS "UNIX 98 擬似端末"
+未使用の UNIX 98 擬似端末マスタをオープンするには \fBposix_openpt\fP(3)  を呼び出す (この関数はマスタクローンデバイス
+(master clone device), \fI/dev/ptmx\fP をオープンする; \fBpts\fP(4)  を参照)。
+プログラム固有の初期化処理を実行し、 \fBgrantpt\fP(3)  を使ってスレーブデバイスの所有権や許可を変更し、 \fBunlockpt\fP(3)
+を使ってスレーブのロック解除を行うと、 \fBptsname\fP(3)  が返す名前を渡して \fBopen\fP(2)  を呼び出すことにより
+対応するスレーブデバイスをオープンできるようになる。
+.PP
+Linux カーネルでは、利用できる UNIX 98 擬似端末の数に上限を設けている。 2.6.3
+以前のカーネルでは、この上限はカーネルのコンパイル時の設定 (\fBCONFIG_UNIX98_PTYS\fP)  である。許可される擬似端末の数は最大
+2048 であり、 デフォルトの設定は 256 である。 カーネル 2.6.4 以降では、この上限は
+\fI/proc/sys/kernel/pty/max\fP 経由で動的に調整可能となっている。また、 \fI/proc/sys/kernel/pty/nr\fP
+で現在使用中の擬似端末の数を取得できる。 この 2つのファイルの詳細は \fBproc\fP(5)  を参照。
+.SS "BSD 擬似端末"
+BSD 風の擬似端末はあらかじめ作成されたペアとして提供される。その名前は \fI/dev/ptyXY\fP (マスタ側)、 \fI/dev/ttyXY\fP
+(スレーブ側) である。ここで、 X は [p\-za\-e] の 16文字のうちの一文字、 Y は [0\-9a\-f] の 16文字のうちの一文字である
+(X, Y に使われる文字の正確な範囲は UNIX の実装により異なる)。 例えば、 \fI/dev/ptyp1\fP と \fI/dev/ttyp1\fP は
+BSD 擬似端末ペアを構成する。 プロセスが未使用の擬似端末ペアを見つけるには、 各擬似端末のマスタの \fBopen\fP(2)  を試み、open
+が成功するまでこれを繰り返す。 マスタを open すると、対応する擬似端末のスレーブも open できるようになる (スレーブの名前は、マスタの名前の
+"pty" を "tty" に置き換えたものである)。
+.SH ファイル
+.TP 
+\fI/dev/ptmx\fP
+UNIX 98 マスタクローンデバイス
+.TP 
+\fI/dev/pts/*\fP
+UNIX 98 スレーブデバイス
+.TP 
+\fI/dev/pty[p\-za\-e][0\-9a\-f]\fP
+BSD マスタデバイス
+.TP 
+\fI/dev/tty[p\-za\-e][0\-9a\-f]\fP
+BSD スレーブデバイス
+.SH 注意
+擬似端末は、ネットワークログインサービス (\fBssh\fP(1), \fBrlogin\fP(1), \fBtelnet\fP(1)) や
+端末エミュレータ (\fBxterm\fP(1), \fBscript\fP(1), \fBscreen\fP(1), \fBtmux\fP(1),
+\fBunbuffer\fP(1), \fBexpect\fP(1) など) のアプリケーションで使用されている。
+.PP
+パケットモード操作の制御を行う \fBTIOCPKT\fP \fBioctl\fP(2) の説明は \fBioctl_tty\fP(2) に書かれている。
+.PP
+BSD \fBioctl\fP(2)  の \fBTIOCSTOP\fP, \fBTIOCSTART\fP, \fBTIOCUCNTL\fP, \fBTIOCREMOTE\fP
+はこれまでのところ Linux では実装されていない。
+.SH 関連項目
+\fBioctl_tty\fP(2), \fBselect\fP(2), \fBsetsid\fP(2), \fBforkpty\fP(3), \fBopenpty\fP(3),
+\fBtermios\fP(3), \fBpts\fP(4), \fBtty\fP(4)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man7/termio.7 b/manual/LDP_man-pages/draft/man7/termio.7
new file mode 100644 (file)
index 0000000..0013a50
--- /dev/null
@@ -0,0 +1,56 @@
+.\" Copyright (c) 2006 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" 28 Dec 2006 - Initial Creation
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2007  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2007-05-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.44
+.\"
+.TH TERMIO 7 2017\-05\-03 Linux "Linux Programmer's Manual"
+.SH 名前
+termio \- System V 端末ドライバインターフェース
+.SH 説明
+\fBtermio\fP は、古い System V 端末ドライバインターフェースの名前である。 このインターフェースは、 端末設定を保持するための
+\fItermio\fP 構造体、および端末属性を取得・変更するための種々の \fBioctl\fP(2)  操作を定義していた。
+.PP
+\fBtermio\fP インターフェースは現在では時代遅れである。 POSIX.1\-1990 で、このインターフェースの修正版が \fBtermios\fP
+という名前で標準化された。 POSIX.1 のデータ構造は System V 版と少し違いがある。 また、POSIX.1 は System V
+版で存在した種々の \fBioctl\fP(2)  操作を置き換える関数群を定義した (このようになったのは、 \fBioctl\fP(2)
+が標準化されていなかったことと、 \fBioctl\fP(2)  の第三引き数が可変長引き数で型チェックができなかったのが理由である)。
+.PP
+"termio" という man page を探しているのであれば、 探している情報のほとんどは \fBtermios\fP(3)  か
+\fBioctl_tty\fP(2) のどちらかで見つかることだろう。
+.SH 関連項目
+\fBreset\fP(1), \fBsetterm\fP(1), \fBstty\fP(1), \fBioctl_tty\fP(2), \fBtermios\fP(3),
+\fBtty\fP(4)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。