1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
4 .\" Redistribute and revise at will.
6 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
7 .\" all rights reserved.
8 .\" Translated Tue Jul 8 00:28:17 JST 2003
9 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
11 .\"WORD: pseudoterminal 擬似端末
14 .TH PTS 4 2002-10-09 "Linux" "Linux Programmer's Manual"
17 .\"O ptmx, pts \- pseudoterminal master and slave
18 ptmx, pts \- 擬似端末のマスタとスレーブ
21 .\"O The file \fI/dev/ptmx\fP is a character file with major number 5 and
22 .\"O minor number 2, usually of mode 0666 and owner.group of root.root.
23 .\"O It is used to create a pseudoterminal master and slave pair.
24 ファイル \fI/dev/ptmx\fP は、メジャーナンバー (major number) 5、
25 マイナーナンバー (minor number) 2 を持つキャラクタ・ファイルであり、
26 通常、モードは 0666 で、所有者.グループは root.root である。
27 このファイルは、擬似端末 (pseudoterminal) のマスタとスレーブの
30 .\"O When a process opens \fI/dev/ptmx\fP, it gets a file
31 .\"O descriptor for a pseudoterminal master (PTM),
32 .\"O and a pseudoterminal slave (PTS) device is created in the
35 .\"O Each file descriptor obtained by opening \fI/dev/ptmx\fP
36 .\"O is an independent PTM with its own associated PTS, whose path can
37 .\"O be found by passing the descriptor to
39 プロセスが \fI/dev/ptmx\fP をオープンすると、そのプロセスには
40 擬似端末マスタ (pseudoterminal master; PTM) へのファイル・
43 ディレクトリに擬似端末スレーブ (pseudoterminal slave; PTS)
45 \fI/dev/ptmx\fP をオープンして得られるファイル・ディスクリプタは
46 それぞれ独立の PTM であり、対応する PTS を各々持つ。
47 PTS のパス名は、PTM のファイル・ディスクリプタを
51 .\"O Before opening the pseudoterminal slave, you must pass the master's file
55 .\"O .BR unlockpt (3).
56 擬似端末スレーブをオープンする前に、必ず、マスタのファイル・ディスクリプタを
63 .\"O Once both the pseudoterminal master and slave are open, the slave provides
64 .\"O processes with an interface that is identical to that of a real terminal.
65 擬似端末のマスタとスレーブの両方がオープンされた後は、スレーブは、
66 プロセスに対して、実端末 (real terminal) と全く同じインタフェースを提供する。
68 .\"O Data written to the slave is presented on the master descriptor as input.
69 .\"O Data written to the master is presented to the slave as input.
70 スレーブに書かれたデータはマスタ・ディスクリプタに対する入力として扱われ、
71 マスタに書かれたデータはスレーブに対する入力として扱われる。
73 .\"O In practice, pseudoterminals are used for implementing terminal emulators
76 .\"O in which data read from the pseudoterminal master is interpreted by the
77 .\"O application in the same way
78 .\"O a real terminal would interpret the data, and for implementing remote-login
81 .\"O in which data read from the pseudoterminal master is sent across the network
82 .\"O to a client program that is connected to a terminal or terminal emulator.
85 のような端末エミュレータを実装するのに使用されている。
86 端末エミュレータでは、擬似端末のマスタから読み込まれたデータは、
87 アプリケーションにとって実端末のデータと全く同じもののように見える。
90 のようなリモート・ログイン用のプログラムの実装では、
91 擬似端末マスタから読み込まれたデータは、ネットワークを経由して、
92 端末や端末エミュレータに接続されているクライアント・プログラムに送信される。
94 .\"O Pseudoterminals can also be used to send input to programs that normally
95 .\"O refuse to read input from pipes (such as
103 のような) 通常はパイプからの入力を拒否するプログラムに、
111 .\"O The Linux support for the above (known as UNIX 98 pseudoterminal naming)
112 .\"O is done using the
114 .\"O file system, that should be mounted on
116 (UNIX 98 pseudoterminal naming と呼ばれる)
117 上記の機能の Linux でのサポートは、通常
123 .\"O Before this UNIX 98 scheme, master pseudoterminals were called
124 .\"O .IR /dev/ptyp0 ", ..."
125 .\"O and slave pseudoterminals
126 .\"O .IR /dev/ttyp0 ", ..."
127 .\"O and one needed lots of preallocated device nodes.
128 この UNIX 98 スキームが導入される前は、マスタ擬似端末は
129 .IR /dev/ptyp0 ", ..."
131 .IR /dev/ttyp0 ", ..."
132 と呼ばれており、あらかじめたくさんのデバイス・ノードを割り当てて