1 .\" Copyright (c) OpenBSD Group
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
28 .\" Converted into a manpage again by Martin Schulze <joey@infodrom.org>
30 .\" Added -lutil remark, 030718
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
40 .\"WORD: pseudoterminal 疑似端末
42 .TH OPENPTY 3 2010-06-13 "GNU" "Linux Programmer's Manual"
44 openpty, login_tty, forkpty \- 端末ユーティリティ関数
49 .BI "int openpty(int *" amaster ", int *" aslave ", char *" name ,
50 .BI " const struct termios *" termp ,
51 .BI " const struct winsize *" winp );
53 .BI "pid_t forkpty(int *" amaster ", char *" name ,
54 .BI " const struct termios *" termp ,
55 .BI " const struct winsize *" winp );
59 .BI "int login_tty(int " fd );
65 関数は、使用可能な疑似端末 (pseudoterminal) を見つけて、
66 マスタとスレーブのファイル・ディスクリプタを
72 が NULL でない場合、スレーブのファイル名が
76 が NULL でない場合、スレーブの端末パラメータは
80 が NULL でない場合、スレーブのウインドウサイズは
95 呼び出し元の標準入力・標準出力・標準エラーのストリームを
106 を組み合わせ、疑似端末を操作する新しいプロセスを生成する。
107 疑似端末のマスタ側のファイル・ディスクリプタは
111 が NULL でない場合には、スレーブのファイル名が
118 疑似端末のスレーブ側の端末属性とウインドウサイズを決定する。
134 の親プロセスは子プロセスのプロセス ID を返す。
146 を呼び出し元のプロセスの制御端末に設定するのに失敗した場合、
157 これらは BSD の関数であり、libc5 と glibc2 に存在する。
160 .\" これらの関数は libutil に含まれている。したがって、コンパイル時の
173 2.0.92 より前のバージョンの glibc では、
175 は BSD 疑似端末ペアのファイル・ディスクリプタを返す。
178 はまず Unix 98 疑似端末ペアをオープンしようとし、それに失敗した場合に
179 BSD 疑似端末ペアのオープンへと移行する。
183 に対してどのくらい大きさを予約しておけばいいか分からない。