OSDN Git Service

1e8ac97de3bf50d7b2267ee99c18784e79e64d56
[linuxjm/LDP_man-pages.git] / draft / man3 / ctermid.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\" License.
23 .\" Modified Sat Jul 24 19:51:06 1993 by Rik Faith (faith@cs.unc.edu)
24 .\"
25 .\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
26 .\"         all rights reserved.
27 .\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
28 .\"
29 .TH CTERMID 3  2007-07-26 "GNU" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH 名前
32 .\"O ctermid \- get controlling terminal name
33 ctermid \- 制御端末名の取得
34 .\"O .SH SYNOPSIS
35 .SH 書式
36 .nf
37 .B #include <stdio.h>
38 .\" POSIX also requires this function to be declared in <unistd.h>,
39 .\" and glibc does so if suitable feature test macros are defined.
40 .sp
41 .BI "char *ctermid(char *" "s" );
42 .fi
43 .sp
44 .in -4n
45 .\"O Feature Test Macro Requirements for glibc (see
46 .\"O .BR feature_test_macros (7)):
47 glibc 向けの機能検査マクロの要件
48 .RB ( feature_test_macros (7)
49 参照):
50 .in
51 .sp
52 .BR ctermid ():
53 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
54 .\" From <unistd.h>: _XOPEN_SOURCE
55 .\"O .SH DESCRIPTION
56 .SH 説明
57 .\"O .BR ctermid ()
58 .\"O returns a string which is the pathname for the current
59 .\"O controlling terminal for this process.
60 .\"O If
61 .\"O .I s
62 .\"O is NULL,
63 .\"O a static buffer is used, otherwise
64 .\"O .I s
65 .\"O points to a buffer used to hold the terminal pathname.
66 .\"O The symbolic constant
67 .\"O .B L_ctermid
68 .\"O is the maximum number of characters in the returned pathname.
69 .BR ctermid ()
70 はプロセスの現在の制御端末のパス名を返す。
71 .I s
72 が NULL の場合、静的なバッファを用いる。それ以外の場合、
73 .I s
74 は端末パス名を保持するのに使用されるバッファへのポインタとなる。
75 シンボル定数
76 .B L_ctermid
77 は返されるパス名の最大文字数である。
78 .\"O .SH "RETURN VALUE"
79 .SH 返り値
80 .\"O The pointer to the pathname.
81 パス名へのポインタ。
82 .\"O .SH "CONFORMING TO"
83 .SH 準拠
84 SVr4, POSIX.1-2001.
85 .\"O .SH BUGS
86 .SH バグ
87 .\"O The path returned may not uniquely identify the controlling
88 .\"O terminal; it may, for example, be
89 .\"O .IR /dev/tty .
90 返されたパスはたぶん制御端末を一意には特定できない。
91 たとえば
92 .I /dev/tty
93 のように。
94 .PP
95 .\"O It is not assured that the program can open the terminal.
96 プログラムが端末をオープンできることは保証されていない。
97 .\" in glibc 2.3.x, x >= 4, the glibc headers threw an error
98 .\" if ctermid() was given an argument; fixed in 2.4.
99 .\"O .SH "SEE ALSO"
100 .SH 関連項目
101 .BR ttyname (3)