OSDN Git Service

(split) [JM:00125] Fix a translation mistake in isupper(3).
[linuxjm/LDP_man-pages.git] / release / man3 / openpty.3
1 .\" Copyright (c) OpenBSD Group
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\" Converted into a manpage again by Martin Schulze <joey@infodrom.org>
29 .\"
30 .\" Added -lutil remark, 030718
31 .\"
32 .\" Japanese Version Copyright (c) 2002 Yuichi SATO
33 .\"         all rights reserved.
34 .\" Translated Tue Jan 22 21:42:05 JST 2002
35 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
36 .\" Updated Mon Mar  8 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
37 .\" Updated Sun Sep 14 2003 by Akihiro MOTOKI
38 .\"
39 .\"WORD:        tty             Ã¼Ëö
40 .\"WORD:        pseudoterminal  µ¿»÷üËö
41 .\"
42 .TH OPENPTY 3  2010-06-13 "GNU" "Linux Programmer's Manual"
43 .SH Ì¾Á°
44 openpty, login_tty, forkpty \- Ã¼Ëö¥æ¡¼¥Æ¥£¥ê¥Æ¥£´Ø¿ô
45 .SH ½ñ¼°
46 .nf
47 .B #include <pty.h>
48 .sp
49 .BI "int openpty(int *" amaster ", int *" aslave ", char *" name ,
50 .BI "            const struct termios *" termp ,
51 .BI "            const struct winsize *" winp );
52 .sp
53 .BI "pid_t forkpty(int *" amaster ", char *" name ,
54 .BI "              const struct termios *" termp ,
55 .BI "              const struct winsize *" winp );
56 .sp
57 .B #include <utmp.h>
58 .sp
59 .BI "int login_tty(int " fd );
60 .sp
61 \fI\-lutil\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
62 .fi
63 .SH ÀâÌÀ
64 .BR openpty ()
65 ´Ø¿ô¤Ï¡¢»ÈÍѲÄǽ¤Êµ¿»÷üËö (pseudoterminal) ¤ò¸«¤Ä¤±¤Æ¡¢
66 ¥Þ¥¹¥¿¤È¥¹¥ì¡¼¥Ö¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò
67 .I amaster
68 ¤È
69 .I aslave
70 ¤ËÆþ¤ì¤ÆÊÖ¤¹¡£
71 .I name
72 ¤¬ NULL ¤Ç¤Ê¤¤¾ì¹ç¡¢¥¹¥ì¡¼¥Ö¤Î¥Õ¥¡¥¤¥ë̾¤¬
73 .I name
74 ¤ËÊÖ¤µ¤ì¤ë¡£
75 .I termp
76 ¤¬ NULL ¤Ç¤Ê¤¤¾ì¹ç¡¢¥¹¥ì¡¼¥Ö¤ÎüËö¥Ñ¥é¥á¡¼¥¿¤Ï
77 .I termp
78 ¤ÎÃͤËÀßÄꤵ¤ì¤ë¡£
79 .I winp
80 ¤¬ NULL ¤Ç¤Ê¤¤¾ì¹ç¡¢¥¹¥ì¡¼¥Ö¤Î¥¦¥¤¥ó¥É¥¦¥µ¥¤¥º¤Ï
81 .I winp
82 ¤ËÀßÄꤵ¤ì¤ë¡£
83
84 .BR login_tty ()
85 ´Ø¿ô¤Ï¡¢Ã¼Ëö
86 .I fd
87 ¤Ë¥í¥°¥¤¥ó¤¹¤ë½àÈ÷¤ò¤¹¤ë
88 .RI ( fd
89 ¤Ï¼ÂºÝ¤ÎüËö¥Ç¥Ð¥¤¥¹¤Ç¤â¡¢
90 .BR openpty ()
91 ¤ÇÊÖ¤µ¤ì¤ëµ¿»÷üËö¤Î¥¹¥ì¡¼¥Ö¤Ç¤â¤è¤¤)¡£
92 ¶ñÂÎŪ¤Ë¤Ï¡¢¿·¤·¤¤¥»¥Ã¥·¥ç¥ó¤òºîÀ®¤·¡¢
93 .I fd
94 ¤ò¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤È¤·¡¢
95 ¸Æ¤Ó½Ð¤·¸µ¤Îɸ½àÆþÎÏ¡¦É¸½à½ÐÎÏ¡¦É¸½à¥¨¥é¡¼¤Î¥¹¥È¥ê¡¼¥à¤ò
96 .I fd
97 ¤ËÀßÄꤷ¤¿¸å¡¢
98 .I fd
99 ¤ò¥¯¥í¡¼¥º¤¹¤ë¡£
100
101 .BR forkpty ()
102 ´Ø¿ô¤Ï
103 .BR openpty (),
104 .BR fork (2),
105 .BR login_tty ()
106 ¤òÁȤ߹ç¤ï¤»¡¢µ¿»÷üËö¤òÁàºî¤¹¤ë¿·¤·¤¤¥×¥í¥»¥¹¤òÀ¸À®¤¹¤ë¡£
107 µ¿»÷üËö¤Î¥Þ¥¹¥¿Â¦¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ï
108 .I amaster
109 ¤ËÊÖ¤µ¤ì¡¢
110 .I name
111 ¤¬ NULL ¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¥¹¥ì¡¼¥Ö¤Î¥Õ¥¡¥¤¥ë̾¤¬
112 .I name
113 ¤ËÊÖ¤µ¤ì¤ë¡£
114 .I termp
115 ¤È
116 .I winp
117 °ú¤­¿ô¤Ï¡¢NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢
118 µ¿»÷üËö¤Î¥¹¥ì¡¼¥Ö¦¤ÎüËö°À­¤È¥¦¥¤¥ó¥É¥¦¥µ¥¤¥º¤ò·èÄꤹ¤ë¡£
119 .SH ÊÖ¤êÃÍ
120 .BR openpty (),
121 .BR login_tty (),
122 .BR forkpty ()
123 ¤Î¸Æ¤Ó½Ð¤·¤¬À®¸ù¤·¤Ê¤«¤Ã¤¿¾ì¹ç¡¢
124 \-1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢
125 .I errno
126 ¤Ï¥¨¥é¡¼¤ò¼¨¤¹ÃͤËÀßÄꤵ¤ì¤ë¡£
127 À®¸ù¤·¤¿¾ì¹ç¡¢
128 .BR openpty (),
129 .BR login_tty ()
130 ¤ª¤è¤Ó  
131 .BR forkpty ()
132 ¤Î»Ò¥×¥í¥»¥¹¤Ï 0 ¤òÊÖ¤·¡¢
133 .BR forkpty ()
134 ¤Î¿Æ¥×¥í¥»¥¹¤Ï»Ò¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹ ID ¤òÊÖ¤¹¡£
135 .SH ¥¨¥é¡¼
136 °Ê²¼¤Î¾ì¹ç¤Ë
137 .BR openpty ()
138 ¤Ï¼ºÇÔ¤¹¤ë:
139 .TP
140 .B ENOENT
141 »ÈÍѲÄǽ¤ÊüËö¤¬¤Ê¤¤¡£
142 .LP
143 .BR ioctl (2)
144 ¤¬
145 .I fd
146 ¤ò¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤ËÀßÄꤹ¤ë¤Î¤Ë¼ºÇÔ¤·¤¿¾ì¹ç¡¢
147 .BR login_tty ()
148 ¤Ï¼ºÇÔ¤¹¤ë¡£
149 .LP
150 .BR openpty ()
151 ¤Þ¤¿¤Ï
152 .BR fork (2)
153 ¤Î¤É¤Á¤é¤«¤¬¼ºÇÔ¤·¤¿¾ì¹ç¡¢
154 .BR forkpty ()
155 ¤Ï¼ºÇÔ¤¹¤ë¡£
156 .SH ½àµò
157 ¤³¤ì¤é¤Ï BSD ¤Î´Ø¿ô¤Ç¤¢¤ê¡¢libc5 ¤È glibc2 ¤Ë¸ºß¤¹¤ë¡£
158 POSIX ¤Ç¤Îɸ½à²½¤Ï¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
159 .SH Ãí°Õ
160 .\" ¤³¤ì¤é¤Î´Ø¿ô¤Ï libutil ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢¥³¥ó¥Ñ¥¤¥ë»þ¤Î
161 .\" ¥ª¥×¥·¥ç¥ó¤Ë
162 .\" .B \-lutil
163 .\" ¤ò²Ã¤¨¤ëɬÍפ¬¤¢¤ë¡£
164 .\"
165 glibc 2.8 ¤Ç¡¢
166 .BR openpty ()
167 ¤È
168 .BR forkpty ()
169 ¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Î°ú¤­¿ô¤Ë
170 .B const
171 ½¤¾þ»Ò¤¬Äɲ䵤줿¡£
172
173 2.0.92 ¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Î glibc ¤Ç¤Ï¡¢
174 .BR openpty ()
175 ¤Ï BSD µ¿»÷üËö¥Ú¥¢¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
176 2.0.92 °Ê¹ß¤Î glibc ¤Ç¤Ï¡¢
177 .BR openpty ()
178 ¤Ï¤Þ¤º Unix 98 µ¿»÷üËö¥Ú¥¢¤ò¥ª¡¼¥×¥ó¤·¤è¤¦¤È¤·¡¢¤½¤ì¤Ë¼ºÇÔ¤·¤¿¾ì¹ç¤Ë
179 BSD µ¿»÷üËö¥Ú¥¢¤Î¥ª¡¼¥×¥ó¤Ø¤È°Ü¹Ô¤¹¤ë¡£
180 .SH ¥Ð¥°
181 ï¤â
182 .I name
183 ¤ËÂФ·¤Æ¤É¤Î¤¯¤é¤¤Â礭¤µ¤òͽÌ󤷤Ƥª¤±¤Ð¤¤¤¤¤«Ê¬¤«¤é¤Ê¤¤¡£
184 ¤·¤¿¤¬¤Ã¤Æ¡¢NULL ¤Ç¤Ê¤¤
185 .I name
186 ¤ò°ú¤­¿ô¤È¤·¤Æ
187 .BR openpty ()
188 ¤ä
189 .BR forkpty ()
190 ¤ò¸Æ¤Ó½Ð¤¹¤Î¤Ï°ÂÁ´¤Ç¤¢¤ë¤È¤Ï¸À¤¨¤Ê¤¤¡£
191 .SH ´ØÏ¢¹àÌÜ
192 .BR fork (2),
193 .BR ttyname (3),
194 .BR pty (7)