File: pty.7

package info (click to toggle)
manpages-ja 0.5.0.0.20100315-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 21,156 kB
  • ctags: 1
  • sloc: sh: 13,935; perl: 157; makefile: 114
file content (162 lines) | stat: -rw-r--r-- 5,395 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (C) 2005 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" 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.
.\"
.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
.\" Translated 2005-10-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.\"WORD:	pseudo-terminal		ü
.\"WORD:	character device	饯ǥХ
.\"WORD:	pseudo-terminal		
.\"
.TH PTY 7 2005-10-10 "Linux" "Linux Programmer's Manual"
.SH ̾
pty \- ü󥿥ե
.SH 
ü (pseudo-terminal) ϡ̿ͥ󶡤
ۥ饯ǥХΥڥǤ롣
ͥΰü
.I ޥ (master)
ȸƤФ졢⤦ü
.I 졼 (slave)
ȸƤФ롣
üΥ졼֤ϡŪüƱư򤹤륤󥿥ե
󶡤롣ü³뤳ȤꤷƤץϵü
졼֤򥪡ץ󤹤뤳ȤǤʹߤϥޥ¦򥪡ץ
Ƥץफ餽Υץ椹뤳ȤǤ롣
üϤ줿ΤƱ褦ˡ
ޥ¦˽񤭹ޤ줿ƤΥǡϡ졼¦Υץ롣
㤨СޥǥХ˳ߥ饯 (̾ control-C) 񤭹ȡ
졼֤³Ƥե饦ɡץ롼פФ
ߥʥ
.RB ( SIGINT )
ȿФˡüΥ졼¦˽񤭹ޤ줿ƤΥǡϡ
ޥ¦³Ƥץɤ߽ФȤǤ롣
üϡͥåȥ󥵡ӥ
.RB ( ssh "(1), " rlogin "(1), " telnet (1))
üߥ졼
.BR script (1),
.BR screen (1),
.BR expect (1)
ʤɤΥץꥱǻѤƤ롣

Ū˸ BSD  System V 2εü API ȯŸƤƤ롣
SUSv1  System V API ˴Ťü API ɸಽƤꡢ
üѤ뿷ץϤ٤Ƥ API Ѥ٤Ǥ롣

Linux Ǥ BSD  (ɸಽ줿) System V εü󶡤Ƥ롣
System V üϡLinux ƥǤϰ̤ Unix 98 üȸƤФƤ롣
ͥ 2.6.4 ʹߤǤϡBSD εüѻͽȤߤʤƤ
(ͥΥե졼 BSD εü̵ˤ뤳ȤǤ)
ץꥱǤϡUnix 98 üѤ٤Ǥ롣
.SS "Unix 98 ü"
̤Ѥ Unix 98 üޥ򥪡ץ󤹤ˤ
.BR posix_openpt (3)
ƤӽФ
(δؿϥޥ󡦥ǥХ (master clone device),
.I /dev/ptmx
򥪡ץ󤹤;
.BR pts (4)
򻲾)
ץͭν¹Ԥ
.BR grantpt (3)
Ȥäƥ졼֥ǥХνͭĤѹ
.BR unlockpt (3)
Ȥäƥ졼֤ΥåԤȡ
.BR ptsname (3)
֤̾Ϥ
.BR open (2)
ƤӽФȤˤ
б륹졼֥ǥХ򥪡ץǤ褦ˤʤ롣

Linux ͥǤϡѤǤ Unix 98 üο˾¤ߤƤ롣
2.6.3 ΥͥǤϡξ¤ϥͥΥѥ
.RB ( CONFIG_UNIX98_PTYS )
Ǥ롣Ĥ뵼üοϺ 2048 Ǥꡢ
ǥեȤ 256 Ǥ롣
ͥ 2.6.4 ʹߤǤϡξ¤
.I /proc/sys/kernel/pty/max
ͳưŪĴǽȤʤäƤ롣ޤ
.I /proc/sys/kernel/pty/nr
Ǹ߻εüοǤ롣
 2ĤΥեξܺ٤
.BR proc (5)
򻲾ȡ
.SS "BSD ü"
BSD εüϤ餫줿ڥȤ󶡤롣̾
.I /dev/ptyXY
(ޥ¦)
.I /dev/ttyXY
(졼¦) Ǥ롣ǡ
X  [p-za-e]  16ʸΤΰʸ
Y  [0-9a-f]  16ʸΤΰʸǤ
(X, Y ˻ȤʸΤϰϤ Unix μˤۤʤ)
㤨С
.I /dev/ptyp1

.I /dev/ttyp1
 BSD üڥ롣
ץ̤Ѥεüڥ򸫤Ĥˤϡ
ƵüΥޥ
.BR open (2)
ߡopen ޤǤ򷫤֤
ޥ open ȡб뵼üΥ졼֤ open Ǥ褦ˤʤ
(졼֤̾ϡޥ̾ "pty"  "tty" ֤ΤǤ)
.SH ե
.I /dev/ptmx
(Unix 98 ޥ󡦥ǥХ)
.br
.I /dev/pts/*
(Unix 98 졼֥ǥХ)
.br
.I /dev/pty[p-za-e][0-9a-f]
(BSD ޥǥХ)
.br
.I /dev/tty[p-za-e][0-9a-f]
(BSD 졼֥ǥХ)
.SH 
ѥåȡ⡼Ԥ
.B TIOCPKT
.BR ioctl (2)

.BR tty_ioctl (4)
˽񤫤Ƥ롣

BSD
.BR ioctl (2)

.BR TIOCSTOP ,
.BR TIOCSTART ,
.BR TIOCUCNTL ,
.B TIOCREMOTE
ϤޤǤΤȤ Linux ǤϼƤʤ
.SH Ϣ
.BR select (2),
.BR setsid (2),
.BR forkpty (3),
.BR openpty (3),
.BR termios (3),
.BR pts (4),
.BR tty (4),
.BR tty_ioctl (4)