1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) 2005 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
26 .\" Translated 2005-10-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\"WORD: pseudo-terminal µ¼»÷üËö
29 .\"WORD: character device ¥¥ã¥é¥¯¥¿¥Ç¥Ð¥¤¥¹
30 .\"WORD: pseudo-terminal
32 .TH PTY 7 2005-10-10 "Linux" "Linux Programmer's Manual"
34 pty \- µ¼»÷üËö¥¤¥ó¥¿¥Õ¥§¡¼¥¹
36 µ¼»÷üËö (pseudo-terminal) ¤Ï¡¢ÁÐÊý¸þÄÌ¿®¥Á¥ã¥ó¥Í¥ë¤òÄ󶡤¹¤ë
37 ²¾ÁÛ¥¥ã¥é¥¯¥¿¥Ç¥Ð¥¤¥¹¤Î¥Ú¥¢¤Ç¤¢¤ë¡£
38 ¥Á¥ã¥ó¥Í¥ë¤Î°ìÊý¤ÎüÅÀ¤Ï
40 ¤È¸Æ¤Ð¤ì¡¢¤â¤¦°ìÊý¤ÎüÅÀ¤Ï
43 µ¼»÷üËö¤Î¥¹¥ì¡¼¥Ö¤Ï¡¢ÅÁÅýŪ¤ÊüËö¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò
44 Ä󶡤¹¤ë¡£Ã¼Ëö¤ËÀܳ¤µ¤ì¤ë¤³¤È¤òÁÛÄꤷ¤Æ¤¤¤ë¥×¥í¥»¥¹¤Ïµ¼»÷üËö¤Î
45 ¥¹¥ì¡¼¥Ö¤ò¥ª¡¼¥×¥ó¤¹¤ë¤³¤È¤¬¤Ç¤¡¢¤½¤ì°Ê¹ß¤Ï¥Þ¥¹¥¿Â¦¤ò¥ª¡¼¥×¥ó
46 ¤·¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤«¤é¤½¤Î¥×¥í¥»¥¹¤òÀ©¸æ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
47 üËö¤ÇÆþÎϤµ¤ì¤¿¤Î¤ÈƱ¤¸¤è¤¦¤Ë¡¢
48 ¥Þ¥¹¥¿Â¦¤Ë½ñ¤¹þ¤Þ¤ì¤¿Á´¤Æ¤Î¥Ç¡¼¥¿¤Ï¡¢¥¹¥ì¡¼¥Ö¦¤Î¥×¥í¥»¥¹¤ËÁ÷¤é¤ì¤ë¡£
49 Î㤨¤Ð¡¢¥Þ¥¹¥¿¥Ç¥Ð¥¤¥¹¤Ë³ä¤ê¹þ¤ß¥¥ã¥é¥¯¥¿ (Ä̾ï¤Ï control-C) ¤ò½ñ¤¹þ¤à¤È¡¢
50 ¥¹¥ì¡¼¥Ö¤ËÀܳ¤µ¤ì¤Æ¤¤¤ë¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ËÂФ·¤Æ
54 È¿ÂФˡ¢µ¼»÷üËö¤Î¥¹¥ì¡¼¥Ö¦¤Ë½ñ¤¹þ¤Þ¤ì¤¿Á´¤Æ¤Î¥Ç¡¼¥¿¤Ï¡¢
55 ¥Þ¥¹¥¿Â¦¤ËÀܳ¤µ¤ì¤Æ¤¤¤ë¥×¥í¥»¥¹¤«¤éÆɤ߽Ф¹¤³¤È¤¬¤Ç¤¤ë¡£
56 µ¼»÷üËö¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥í¥°¥¤¥ó¥µ¡¼¥Ó¥¹
57 .RB ( ssh "(1), " rlogin "(1), " telnet (1))
62 ¤Ê¤É¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç»ÈÍѤµ¤ì¤Æ¤¤¤ë¡£
64 Îò»ËŪ¤Ë¸«¤ë¤È BSD ¤È System V ¤Î2¼ïÎà¤Îµ¼»÷üËö¤Î API ¤¬È¯Å¸¤·¤Æ¤¤Æ¤¤¤ë¡£
65 SUSv1 ¤Ï System V API ¤Ë´ð¤Å¤¤¤¿µ¼»÷üËö API ¤òɸ½à²½¤·¤Æ¤ª¤ê¡¢
66 µ¼»÷üËö¤ò»ÈÍѤ¹¤ë¿·¤·¤¤¥×¥í¥°¥é¥à¤Ï¤¹¤Ù¤Æ¤³¤Î API ¤òºÎÍѤ¹¤Ù¤¤Ç¤¢¤ë¡£
68 Linux ¤Ç¤Ï BSD É÷¤È (ɸ½à²½¤µ¤ì¤¿) System V É÷¤Îµ¼»÷üËö¤òÄ󶡤·¤Æ¤¤¤ë¡£
69 System V É÷¤ÎüËö¤Ï¡¢Linux ¥·¥¹¥Æ¥à¤Ç¤Ï°ìÈÌ¤Ë Unix 98 µ¼»÷üËö¤È¸Æ¤Ð¤ì¤Æ¤¤¤ë¡£
70 ¥«¡¼¥Í¥ë 2.6.4 °Ê¹ß¤Ç¤Ï¡¢BSD É÷¤Îµ¼»÷üËö¤ÏÇÑ»ßͽÄê¤È¤ß¤Ê¤µ¤ì¤Æ¤¤¤ë
71 (¥«¡¼¥Í¥ë¤Î¥³¥ó¥Õ¥£¥®¥å¥ì¡¼¥·¥ç¥ó¤Ç BSD É÷¤Îµ¼»÷üËö¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë)¡£
72 ¿·¤·¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï¡¢Unix 98 µ¼»÷üËö¤ò»ÈÍѤ¹¤Ù¤¤Ç¤¢¤ë¡£
73 .SS "Unix 98 µ¼»÷üËö"
74 ̤»ÈÍѤΠUnix 98 µ¼»÷üËö¥Þ¥¹¥¿¤ò¥ª¡¼¥×¥ó¤¹¤ë¤Ë¤Ï
77 (¤³¤Î´Ø¿ô¤Ï¥Þ¥¹¥¿¡¦¥¯¥í¡¼¥ó¡¦¥Ç¥Ð¥¤¥¹ (master clone device),
82 ¥×¥í¥°¥é¥à¸Çͤνé´ü²½½èÍý¤ò¼Â¹Ô¤·¡¢
84 ¤ò»È¤Ã¤Æ¥¹¥ì¡¼¥Ö¥Ç¥Ð¥¤¥¹¤Î½ê͸¢¤äµö²Ä¤òÊѹ¹¤·¡¢
86 ¤ò»È¤Ã¤Æ¥¹¥ì¡¼¥Ö¤Î¥í¥Ã¥¯²ò½ü¤ò¹Ô¤¦¤È¡¢
91 Âбþ¤¹¤ë¥¹¥ì¡¼¥Ö¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ë¡£
93 Linux ¥«¡¼¥Í¥ë¤Ç¤Ï¡¢ÍøÍѤǤ¤ë Unix 98 µ¼»÷üËö¤Î¿ô¤Ë¾å¸Â¤òÀߤ±¤Æ¤¤¤ë¡£
94 2.6.3 °ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¤³¤Î¾å¸Â¤Ï¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë»þ¤ÎÀßÄê
95 .RB ( CONFIG_UNIX98_PTYS )
96 ¤Ç¤¢¤ë¡£µö²Ä¤µ¤ì¤ëµ¼»÷üËö¤Î¿ô¤ÏºÇÂç 2048 ¤Ç¤¢¤ê¡¢
97 ¥Ç¥Õ¥©¥ë¥È¤ÎÀßÄê¤Ï 256 ¤Ç¤¢¤ë¡£
98 ¥«¡¼¥Í¥ë 2.6.4 °Ê¹ß¤Ç¤Ï¡¢¤³¤Î¾å¸Â¤Ï
99 .I /proc/sys/kernel/pty/max
100 ·Ðͳ¤ÇưŪ¤ËÄ´À°²Äǽ¤È¤Ê¤Ã¤Æ¤¤¤ë¡£¤Þ¤¿¡¢
101 .I /proc/sys/kernel/pty/nr
102 ¤Ç¸½ºß»ÈÍÑÃæ¤Îµ¼»÷üËö¤Î¿ô¤ò¼èÆÀ¤Ç¤¤ë¡£
103 ¤³¤Î 2¤Ä¤Î¥Õ¥¡¥¤¥ë¤Î¾ÜºÙ¤Ï
107 BSD É÷¤Îµ¼»÷üËö¤Ï¤¢¤é¤«¤¸¤áºîÀ®¤µ¤ì¤¿¥Ú¥¢¤È¤·¤ÆÄ󶡤µ¤ì¤ë¡£¤½¤Î̾Á°¤Ï
111 (¥¹¥ì¡¼¥Ö¦) ¤Ç¤¢¤ë¡£¤³¤³¤Ç¡¢
112 X ¤Ï [p-za-e] ¤Î 16ʸ»ú¤Î¤¦¤Á¤Î°ìʸ»ú¡¢
113 Y ¤Ï [0-9a-f] ¤Î 16ʸ»ú¤Î¤¦¤Á¤Î°ìʸ»ú¤Ç¤¢¤ë
114 (X, Y ¤Ë»È¤ï¤ì¤ëʸ»ú¤ÎÀµ³Î¤ÊÈÏ°Ï¤Ï Unix ¤Î¼ÂÁõ¤Ë¤è¤ê°Û¤Ê¤ë)¡£
119 ¤Ï BSD µ¼»÷üËö¥Ú¥¢¤ò¹½À®¤¹¤ë¡£
120 ¥×¥í¥»¥¹¤¬Ì¤»ÈÍѤε¼»÷üËö¥Ú¥¢¤ò¸«¤Ä¤±¤ë¤Ë¤Ï¡¢
123 ¤ò»î¤ß¡¢open ¤¬À®¸ù¤¹¤ë¤Þ¤Ç¤³¤ì¤ò·«¤êÊÖ¤¹¡£
124 ¥Þ¥¹¥¿¤ò open ¤¹¤ë¤È¡¢Âбþ¤¹¤ëµ¼»÷üËö¤Î¥¹¥ì¡¼¥Ö¤â open ¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ë
125 (¥¹¥ì¡¼¥Ö¤Î̾Á°¤Ï¡¢¥Þ¥¹¥¿¤Î̾Á°¤Î "pty" ¤ò "tty" ¤ËÃÖ¤´¹¤¨¤¿¤â¤Î¤Ç¤¢¤ë)¡£
128 (Unix 98 ¥Þ¥¹¥¿¡¦¥¯¥í¡¼¥ó¡¦¥Ç¥Ð¥¤¥¹)
131 (Unix 98 ¥¹¥ì¡¼¥Ö¥Ç¥Ð¥¤¥¹)
133 .I /dev/pty[p-za-e][0-9a-f]
136 .I /dev/tty[p-za-e][0-9a-f]
137 (BSD ¥¹¥ì¡¼¥Ö¥Ç¥Ð¥¤¥¹)
139 ¥Ñ¥±¥Ã¥È¡¦¥â¡¼¥ÉÁàºî¤ÎÀ©¸æ¤ò¹Ô¤¦
153 ¤Ï¤³¤ì¤Þ¤Ç¤Î¤È¤³¤í Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£