1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" This page is in the public domain. - aeb
4 .\" 2004-12-17, mtk, added description of ptsname_r() + ERRORS
6 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
7 .\" all rights reserved.
8 .\" Translated 2003-07-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
9 .\" Updated 2005-02-27, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
11 .\"WORD: pseudoterminal 擬似端末
13 .TH PTSNAME 3 2008-09-03 "" "Linux Programmer's Manual"
15 .\"O ptsname, ptsname_r \- get the name of the slave pseudoterminal
17 ptsname, ptsname_r \- スレーブ擬似端末の名前を取得する
21 .\"O .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
22 .BR "#define _XOPEN_SOURCE" " /* feature_test_macros(7) 参照 */"
24 .B #include <stdlib.h>
26 .BI "char *ptsname(int " fd ");"
28 .\"O .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
29 .BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */"
31 .B #include <stdlib.h>
33 .BI "int ptsname_r(int " fd ", char *" buf ", size_t " buflen ");"
39 .\"O function returns the name of the slave pseudoterminal device
40 .\"O corresponding to the master referred to by
45 で参照されるマスタ擬似端末 (pts) デバイスに対応する
50 .\"O function is the reentrant equivalent of
52 .\"O It returns the name of the slave pseudoterminal device as a
53 .\"O null-terminated string in the buffer pointed to by
57 .\"O argument specifies the number of bytes available in
63 この関数は、スレーブ疑似端末デバイスの名前を、
71 .\"O .SH "RETURN VALUE"
75 .\"O returns a pointer to a string in static storage which will be
76 .\"O overwritten by subsequent calls.
77 .\"O This pointer must not be freed.
78 .\"O On failure, a NULL pointer is returned.
91 .\"O On failure, a nonzero value is returned
94 .\"O is set to indicate the error.
95 .\"O .\" In fact the errno value is also returned as the function
96 .\"O .\" result -- MTK, Dec 04
103 .\" 実際には、errno の値が関数の結果の返り値としても返される。-- MTK, Dec 04
108 .\"O .RB ( ptsname_r ()
119 .\"O does not refer to a pseudoterminal master device.
121 がマスタ疑似端末デバイスを参照していない。
124 .\"O .RB ( ptsname_r ()
135 .\"O is provided in glibc since version 2.1.
137 は、バージョン 2.1 以降の glibc で提供されている。
138 .\"O .SH "CONFORMING TO"
141 .\"O is part of the UNIX 98 pseudoterminal support (see
143 .\"O This function is specified in POSIX.1-2001.
145 は UNIX 98 疑似端末仕様の一部である
147 を参照のこと)。この関数は POSIX.1-2001 で規定されている。
149 .\"O .BR ptsname_r ()
150 .\"O is a Linux extension.
151 .\"O A version of this function is documented on Tru64 and HP-UX, but
152 .\"O on those implementations, \-1 is returned on error, with
154 .\"O set to indicate the error.
155 .\"O Avoid using this function in portable programs.
158 この関数についての記載があるものとして Tru64 と HP-UX があるが、
159 これらの OS での実装ではエラーの場合 \-1 を返し、
162 移植を考慮したプログラムではこの関数の使用は避けること。
166 .BR posix_openpt (3),